From a4b6c49ec86cb527ca76d16a467a00988352be0a Mon Sep 17 00:00:00 2001 From: inactivist Date: Wed, 5 Sep 2012 12:47:59 -0700 Subject: [PATCH] Tweepy issue #205: Adding stall_warnings support to Stream.filter method. --- tweepy/streaming.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.25.1