From 5f2c04ff2a8cd2046ab13d660d32152efd2027ae Mon Sep 17 00:00:00 2001 From: AlanBell Date: Wed, 30 Mar 2011 12:55:24 -0700 Subject: [PATCH] Add User Streams. --- tweepy/streaming.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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'} -- 2.25.1