Commit 4bcdf5a8 authored by Rene Bruns's avatar Rene Bruns
Browse files

Added language parameter to streaming filter

(see: https://dev.twitter.com/blog/introducing-new-metadata-for-tweets)
parent b4fc516f
......@@ -208,7 +208,7 @@ class Stream(object):
self._start(async)
def filter(self, follow=None, track=None, async=False, locations=None,
count = None, stall_warnings=False):
count = None, stall_warnings=False, languages=None):
self.parameters = {}
self.headers['Content-type'] = "application/x-www-form-urlencoded"
if self.running:
......@@ -225,6 +225,8 @@ class Stream(object):
self.parameters['count'] = count
if stall_warnings:
self.parameters['stall_warnings'] = stall_warnings
if languages:
self.parameters['language'] = ','.join(map(str, languages))
self.body = urlencode_noplus(self.parameters)
self.parameters['delimited'] = 'length'
self._start(async)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment