aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon/Mastodon.py')
-rw-r--r--mastodon/Mastodon.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index c1027a2..ce7e1d0 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -674,7 +674,7 @@ class Mastodon:
674 """ 674 """
675 Accept an incoming follow request. 675 Accept an incoming follow request.
676 676
677 Returns a user dict of the authorized account. 677 Returns an empty dict.
678 """ 678 """
679 return self.__api_request('POST', '/api/v1/follow_requests/' + str(id) + "/authorize") 679 return self.__api_request('POST', '/api/v1/follow_requests/' + str(id) + "/authorize")
680 680
@@ -682,7 +682,7 @@ class Mastodon:
682 """ 682 """
683 Reject an incoming follow request. 683 Reject an incoming follow request.
684 684
685 Returns a user dict of the rejected account. 685 Returns an empty dict.
686 """ 686 """
687 return self.__api_request('POST', '/api/v1/follow_requests/' + str(id) + "/reject") 687 return self.__api_request('POST', '/api/v1/follow_requests/' + str(id) + "/reject")
688 688
@@ -739,6 +739,16 @@ class Mastodon:
739 """ 739 """
740 return self.__stream('/api/v1/streaming/public', listener) 740 return self.__stream('/api/v1/streaming/public', listener)
741 741
742 def local_stream(self, listener):
743 """
744 Streams local events. 'listener' should be a subclass of
745 StreamListener.
746
747 This method blocks forever, calling callbacks on 'listener' for
748 incoming events.
749 """
750 return self.__stream('/api/v1/streaming/public/local', listener)
751
742 def hashtag_stream(self, tag, listener): 752 def hashtag_stream(self, tag, listener):
743 """ 753 """
744 Returns all public statuses for the hashtag 'tag'. 'listener' should be 754 Returns all public statuses for the hashtag 'tag'. 'listener' should be
Powered by cgit v1.2.3 (git 2.41.0)