aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index d42c13f..06fe8a1 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -360,6 +360,18 @@ class Mastodon:
360 return self.__api_request('GET', '/api/v1/favourites') 360 return self.__api_request('GET', '/api/v1/favourites')
361 361
362 ### 362 ###
363 # Reading data: Follow requests
364 ###
365 def follow_requests(self, max_id = None, since_id = None, limit = None):
366 """
367 Fetch the authenticated user's incoming follow requests.
368
369 Returns a list of user dicts.
370 """
371 params = self.__generate_params(locals())
372 return self.__api_request('GET', '/api/v1/follow_requests', params)
373
374 ###
363 # Writing data: Statuses 375 # Writing data: Statuses
364 ### 376 ###
365 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None): 377 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None):
@@ -510,6 +522,25 @@ class Mastodon:
510 return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/unmute") 522 return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/unmute")
511 523
512 ### 524 ###
525 # Writing data: Follow requests
526 ###
527 def follow_request_authorize(self, id):
528 """
529 Accept an incoming follow request.
530
531 Returns a user dict of the authorized account.
532 """
533 return self.__api_request('POST', '/api/v1/follow_requests/' + str(id) + "/authorize")
534
535 def follow_request_reject(self, id):
536 """
537 Reject an incoming follow request.
538
539 Returns a user dict of the rejected account.
540 """
541 return self.__api_request('POST', '/api/v1/follow_requests/' + str(id) + "/reject")
542
543 ###
513 # Writing data: Media 544 # Writing data: Media
514 ### 545 ###
515 def media_post(self, media_file, mime_type = None): 546 def media_post(self, media_file, mime_type = None):
Powered by cgit v1.2.3 (git 2.41.0)