From: inactivist Date: Wed, 5 Sep 2012 19:47:59 +0000 (-0700) Subject: Tweepy issue #205: Adding stall_warnings support to Stream.filter method. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a4b6c49ec86cb527ca76d16a467a00988352be0a;p=tweepy.git Tweepy issue #205: Adding stall_warnings support to Stream.filter method. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index ecc4847..3e6910f 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -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)