From: w43L Date: Wed, 1 Dec 2010 02:22:35 +0000 (+0800) Subject: added support for count parameter in filter method X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9c3539b5329f54d8ed3a89e986b501bc7387c6f9;p=tweepy.git added support for count parameter in filter method --- 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)