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
a4b6c49e
Commit
a4b6c49e
authored
Sep 05, 2012
by
inactivist
Browse files
Tweepy issue #205: Adding stall_warnings support to Stream.filter method.
parent
0fd129e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
a4b6c49e
...
...
@@ -208,7 +208,8 @@ class Stream(object):
self
.
url
+=
'&count=%s'
%
count
self
.
_start
(
async
)
def
filter
(
self
,
follow
=
None
,
track
=
None
,
async
=
False
,
locations
=
None
,
count
=
None
):
def
filter
(
self
,
follow
=
None
,
track
=
None
,
async
=
False
,
locations
=
None
,
count
=
None
,
stall_warnings
=
False
):
self
.
parameters
=
{}
self
.
headers
[
'Content-type'
]
=
"application/x-www-form-urlencoded"
if
self
.
running
:
...
...
@@ -223,6 +224,8 @@ class Stream(object):
self
.
parameters
[
'locations'
]
=
','
.
join
([
'%.2f'
%
l
for
l
in
locations
])
if
count
:
self
.
parameters
[
'count'
]
=
count
if
stall_warnings
:
self
.
parameters
[
'stall_warnings'
]
=
stall_warnings
self
.
body
=
urlencode_noplus
(
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