Commit 9c3539b5 authored by w43L's avatar w43L Committed by Joshua Roesslein
Browse files

added support for count parameter in filter method

parent 9e847e49
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment