From c57ad7f6b949f31b288f2676f0a30e745c732ca0 Mon Sep 17 00:00:00 2001 From: fumi-san Date: Fri, 5 May 2017 17:23:12 +0900 Subject: 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. --- mastodon/Mastodon.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 3b00f37..fc3af85 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -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 -- cgit v1.2.3