Commit a4b6c49e authored by inactivist's avatar inactivist
Browse files

Tweepy issue #205: Adding stall_warnings support to Stream.filter method.

parent 0fd129e8
...@@ -208,7 +208,8 @@ class Stream(object): ...@@ -208,7 +208,8 @@ class Stream(object):
self.url += '&count=%s' % count self.url += '&count=%s' % count
self._start(async) 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.parameters = {}
self.headers['Content-type'] = "application/x-www-form-urlencoded" self.headers['Content-type'] = "application/x-www-form-urlencoded"
if self.running: if self.running:
...@@ -223,6 +224,8 @@ class Stream(object): ...@@ -223,6 +224,8 @@ class Stream(object):
self.parameters['locations'] = ','.join(['%.2f' % l for l in locations]) self.parameters['locations'] = ','.join(['%.2f' % l for l in locations])
if count: if count:
self.parameters['count'] = count self.parameters['count'] = count
if stall_warnings:
self.parameters['stall_warnings'] = stall_warnings
self.body = urlencode_noplus(self.parameters) self.body = urlencode_noplus(self.parameters)
self.parameters['delimited'] = 'length' self.parameters['delimited'] = 'length'
self._start(async) 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