From: Joshua Roesslein Date: Sun, 10 Feb 2013 21:09:33 +0000 (-0800) Subject: Bump streaming to API v1.1. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ce36f9681fab82d52d02bf89d9f3ac2a6e06d5c4;p=tweepy.git Bump streaming to API v1.1. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 044bd32..ab97fbd 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -14,7 +14,7 @@ from tweepy.error import TweepError from tweepy.utils import import_simplejson, urlencode_noplus json = import_simplejson() -STREAM_VERSION = 1 +STREAM_VERSION = '1.1' class StreamListener(object): @@ -186,7 +186,7 @@ class Stream(object): self.parameters = {'delimited': 'length'} if self.running: raise TweepError('Stream object already connected!') - self.url = '/%i/statuses/firehose.json?delimited=length' % STREAM_VERSION + self.url = '/%s/statuses/firehose.json?delimited=length' % STREAM_VERSION if count: self.url += '&count=%s' % count self._start(async) @@ -195,14 +195,14 @@ class Stream(object): self.parameters = {'delimited': 'length'} if self.running: raise TweepError('Stream object already connected!') - self.url = '/%i/statuses/retweet.json?delimited=length' % STREAM_VERSION + self.url = '/%s/statuses/retweet.json?delimited=length' % STREAM_VERSION self._start(async) def sample(self, count=None, async=False): self.parameters = {'delimited': 'length'} if self.running: raise TweepError('Stream object already connected!') - self.url = '/%i/statuses/sample.json?delimited=length' % STREAM_VERSION + self.url = '/%s/statuses/sample.json?delimited=length' % STREAM_VERSION if count: self.url += '&count=%s' % count self._start(async) @@ -213,7 +213,7 @@ class Stream(object): self.headers['Content-type'] = "application/x-www-form-urlencoded" if self.running: raise TweepError('Stream object already connected!') - self.url = '/%i/statuses/filter.json?delimited=length' % STREAM_VERSION + self.url = '/%s/statuses/filter.json?delimited=length' % STREAM_VERSION if follow: self.parameters['follow'] = ','.join(map(str, follow)) if track: