From 9c3539b5329f54d8ed3a89e986b501bc7387c6f9 Mon Sep 17 00:00:00 2001 From: w43L Date: Wed, 1 Dec 2010 10:22:35 +0800 Subject: [PATCH] added support for count parameter in filter method --- tweepy/streaming.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index c65ae9e..5ac12db 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -191,7 +191,7 @@ class Stream(object): self.url += '&count=%s' % count self._start(async) - def filter(self, follow=None, track=None, async=False, locations=None): + def filter(self, follow=None, track=None, async=False, locations=None, count = None): self.parameters = {} self.headers['Content-type'] = "application/x-www-form-urlencoded" if self.running: @@ -204,6 +204,8 @@ class Stream(object): if locations and len(locations) > 0: assert len(locations) % 4 == 0 self.parameters['locations'] = ','.join(['%.2f' % l for l in locations]) + if count: + self.parameters['count'] = count self.body = urllib.urlencode(self.parameters) self.parameters['delimited'] = 'length' self._start(async) -- 2.25.1