Add local_stream method for getting local streaming timeline.

There was no way to get local streaming timeline.
Add 'local_stream' method whose behavior is like 'public_stream' method.
This commit is contained in:
fumi-san 2017-05-05 17:23:12 +09:00
pare 893ff2e134
commit c57ad7f6b9

Veure arxiu

@ -735,6 +735,16 @@ class Mastodon:
"""
return self.__stream('/api/v1/streaming/public', listener)
def local_stream(self, listener):
"""
Streams local events. 'listener' should be a subclass of
StreamListener.
This method blocks forever, calling callbacks on 'listener' for
incoming events.
"""
return self.__stream('/api/v1/streaming/public/local', listener)
def hashtag_stream(self, tag, listener):
"""
Returns all public statuses for the hashtag 'tag'. 'listener' should be