aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfumi-san <[email protected]>2017-05-05 17:23:12 +0900
committerfumi-san <[email protected]>2017-05-05 17:23:12 +0900
commitc57ad7f6b949f31b288f2676f0a30e745c732ca0 (patch)
tree1f358dc437b201ed482558d8d70d0138ca072288 /mastodon
parent893ff2e1348d3be512f27120ae3fd1ef55fadb95 (diff)
downloadmastodon.py-c57ad7f6b949f31b288f2676f0a30e745c732ca0.tar.gz
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.
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py10
1 files changed, 10 insertions, 0 deletions
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:
735 """ 735 """
736 return self.__stream('/api/v1/streaming/public', listener) 736 return self.__stream('/api/v1/streaming/public', listener)
737 737
738 def local_stream(self, listener):
739 """
740 Streams local events. 'listener' should be a subclass of
741 StreamListener.
742
743 This method blocks forever, calling callbacks on 'listener' for
744 incoming events.
745 """
746 return self.__stream('/api/v1/streaming/public/local', listener)
747
738 def hashtag_stream(self, tag, listener): 748 def hashtag_stream(self, tag, listener):
739 """ 749 """
740 Returns all public statuses for the hashtag 'tag'. 'listener' should be 750 Returns all public statuses for the hashtag 'tag'. 'listener' should be
Powered by cgit v1.2.3 (git 2.41.0)