Add User Streams.
authorAlanBell <alanbell@ubuntu.com>
Wed, 30 Mar 2011 19:55:24 +0000 (12:55 -0700)
committerJosh Roesslein <jroesslein@gmail.com>
Thu, 14 Apr 2011 05:33:18 +0000 (00:33 -0500)
tweepy/streaming.py

index dfa4ffa519b29bd27c9c4ec53c5676c4570654cd..55e9a46e2264bd1ab93dc2d65dd8becf39d12493 100644 (file)
@@ -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'}