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
ae1465d3
Commit
ae1465d3
authored
Jul 03, 2015
by
Joshua Roesslein
Browse files
Merge pull request #619 from jrmurray000/master
Added support for the "filter_level" parameter for the streaming API
parents
57dac83e
6d927a9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
ae1465d3
...
...
@@ -404,7 +404,7 @@ class Stream(object):
self
.
_start
(
async
)
def
filter
(
self
,
follow
=
None
,
track
=
None
,
async
=
False
,
locations
=
None
,
stall_warnings
=
False
,
languages
=
None
,
encoding
=
'utf8'
):
stall_warnings
=
False
,
languages
=
None
,
encoding
=
'utf8'
,
filter_level
=
None
):
self
.
body
=
{}
self
.
session
.
headers
[
'Content-type'
]
=
"application/x-www-form-urlencoded"
if
self
.
running
:
...
...
@@ -423,6 +423,8 @@ class Stream(object):
self
.
body
[
'stall_warnings'
]
=
stall_warnings
if
languages
:
self
.
body
[
'language'
]
=
u
','
.
join
(
map
(
str
,
languages
))
if
filter_level
:
self
.
body
[
'filter_level'
]
=
unicode
(
filter_level
,
encoding
)
self
.
session
.
params
=
{
'delimited'
:
'length'
}
self
.
host
=
'stream.twitter.com'
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