Commit b64527ac authored by Aaron1011's avatar Aaron1011
Browse files

Merge pull request #494 from jozef-mitro/master

Fix sample to use Requests instead of httplib
parents 4de8d077 6e19c6fb
......@@ -307,13 +307,13 @@ class Stream(object):
self.url = '/%s/statuses/retweet.json' % STREAM_VERSION
def sample(self, async=False, language=None):
def sample(self, async=False, languages=None):
self.session.params = {'delimited': 'length'}
if self.running:
raise TweepError('Stream object already connected!')
self.url = '/%s/statuses/sample.json?delimited=length' % STREAM_VERSION
if language:
self.url += '&language=%s' % language
self.parameters['language'] = language
self.url = '/%s/statuses/sample.json' % STREAM_VERSION
if languages:
self.session.params['language'] = ','.join(map(str, languages))
def filter(self, follow=None, track=None, async=False, locations=None,
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