From ce36f9681fab82d52d02bf89d9f3ac2a6e06d5c4 Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Sun, 10 Feb 2013 13:09:33 -0800 Subject: [PATCH] Bump streaming to API v1.1. --- tweepy/streaming.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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: -- 2.25.1