From: Rene Bruns Date: Wed, 27 Mar 2013 09:58:37 +0000 (+0100) Subject: Added language parameter to streaming filter X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4bcdf5a8cae40736921cda7a894c917be894c4a5;p=tweepy.git Added language parameter to streaming filter (see: https://dev.twitter.com/blog/introducing-new-metadata-for-tweets) --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index ab97fbd..b1bb4b2 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -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)