Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
9c3539b5
Commit
9c3539b5
authored
Dec 01, 2010
by
w43L
Committed by
Joshua Roesslein
Jan 13, 2011
Browse files
added support for count parameter in filter method
parent
9e847e49
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
9c3539b5
...
...
@@ -191,7 +191,7 @@ class Stream(object):
self
.
url
+=
'&count=%s'
%
count
self
.
_start
(
async
)
def
filter
(
self
,
follow
=
None
,
track
=
None
,
async
=
False
,
locations
=
None
):
def
filter
(
self
,
follow
=
None
,
track
=
None
,
async
=
False
,
locations
=
None
,
count
=
None
):
self
.
parameters
=
{}
self
.
headers
[
'Content-type'
]
=
"application/x-www-form-urlencoded"
if
self
.
running
:
...
...
@@ -204,6 +204,8 @@ class Stream(object):
if
locations
and
len
(
locations
)
>
0
:
assert
len
(
locations
)
%
4
==
0
self
.
parameters
[
'locations'
]
=
','
.
join
([
'%.2f'
%
l
for
l
in
locations
])
if
count
:
self
.
parameters
[
'count'
]
=
count
self
.
body
=
urllib
.
urlencode
(
self
.
parameters
)
self
.
parameters
[
'delimited'
]
=
'length'
self
.
_start
(
async
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment