14
14
from tweepy .utils import import_simplejson , urlencode_noplus
15
15
json = import_simplejson ()
16
16
17
- STREAM_VERSION = 1
17
+ STREAM_VERSION = '1.1'
18
18
19
19
20
20
class StreamListener (object ):
@@ -186,7 +186,7 @@ def firehose(self, count=None, async=False):
186
186
self .parameters = {'delimited' : 'length' }
187
187
if self .running :
188
188
raise TweepError ('Stream object already connected!' )
189
- self .url = '/%i /statuses/firehose.json?delimited=length' % STREAM_VERSION
189
+ self .url = '/%s /statuses/firehose.json?delimited=length' % STREAM_VERSION
190
190
if count :
191
191
self .url += '&count=%s' % count
192
192
self ._start (async )
@@ -195,14 +195,14 @@ def retweet(self, async=False):
195
195
self .parameters = {'delimited' : 'length' }
196
196
if self .running :
197
197
raise TweepError ('Stream object already connected!' )
198
- self .url = '/%i /statuses/retweet.json?delimited=length' % STREAM_VERSION
198
+ self .url = '/%s /statuses/retweet.json?delimited=length' % STREAM_VERSION
199
199
self ._start (async )
200
200
201
201
def sample (self , count = None , async = False ):
202
202
self .parameters = {'delimited' : 'length' }
203
203
if self .running :
204
204
raise TweepError ('Stream object already connected!' )
205
- self .url = '/%i /statuses/sample.json?delimited=length' % STREAM_VERSION
205
+ self .url = '/%s /statuses/sample.json?delimited=length' % STREAM_VERSION
206
206
if count :
207
207
self .url += '&count=%s' % count
208
208
self ._start (async )
@@ -213,7 +213,7 @@ def filter(self, follow=None, track=None, async=False, locations=None,
213
213
self .headers ['Content-type' ] = "application/x-www-form-urlencoded"
214
214
if self .running :
215
215
raise TweepError ('Stream object already connected!' )
216
- self .url = '/%i /statuses/filter.json?delimited=length' % STREAM_VERSION
216
+ self .url = '/%s /statuses/filter.json?delimited=length' % STREAM_VERSION
217
217
if follow :
218
218
self .parameters ['follow' ] = ',' .join (map (str , follow ))
219
219
if track :
0 commit comments