aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 641c415..1c9ca4b 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -330,6 +330,25 @@ class Mastodon:
330 return self.__api_request('GET', '/api/v1/accounts/search', params) 330 return self.__api_request('GET', '/api/v1/accounts/search', params)
331 331
332 ### 332 ###
333 # Reading data: Mutes and Blocks
334 ###
335 def mutes(self):
336 """
337 Fetch a list of users muted by the authenticated user.
338
339 Returns a list of user dicts.
340 """
341 return self.__api_request('GET', '/api/v1/mutes')
342
343 def blocks(self):
344 """
345 Fetch a list of users blocked by the authenticated user.
346
347 Returns a list of user dicts.
348 """
349 return self.__api_request('GET', '/api/v1/blocks')
350
351 ###
333 # Writing data: Statuses 352 # Writing data: Statuses
334 ### 353 ###
335 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None): 354 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None):
@@ -462,6 +481,22 @@ class Mastodon:
462 """ 481 """
463 return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/unblock") 482 return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/unblock")
464 483
484 def account_mute(self, id):
485 """
486 Mute a user.
487
488 Returns a relationship dict containing the updated relationship to the user.
489 """
490 return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/mute")
491
492 def account_unmute(self, id):
493 """
494 Unmute a user.
495
496 Returns a relationship dict containing the updated relationship to the user.
497 """
498 return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/unmute")
499
465 ### 500 ###
466 # Writing data: Media 501 # Writing data: Media
467 ### 502 ###
Powered by cgit v1.2.3 (git 2.41.0)