From: AlanBell Date: Wed, 30 Mar 2011 19:55:24 +0000 (-0700) Subject: Add User Streams. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5f2c04ff2a8cd2046ab13d660d32152efd2027ae;p=tweepy.git Add User Streams. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index dfa4ffa..55e9a46 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -159,6 +159,14 @@ class Stream(object): Thread(target=self._run).start() else: self._run() + def userstream(self, count=None, async=False, secure=True): + if self.running: + raise TweepError('Stream object already connected!') + self.url = '/2/user.json' + self.host='userstream.twitter.com' + if count: + self.url += '&count=%s' % count + self._start(async) def firehose(self, count=None, async=False): self.parameters = {'delimited': 'length'}