aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-09-08 16:34:11 +0200
committerLorenz Diener <[email protected]>2017-09-08 16:34:11 +0200
commit517f47083d57d565ecd7e5145a401bbfcc6fbcda (patch)
treeb694da2f0a509388085919ae9f5572ba7c33934e /mastodon
parent84b463ce1dd843f23fee9ae1eb30f5f64ece6541 (diff)
downloadmastodon.py-517f47083d57d565ecd7e5145a401bbfcc6fbcda.tar.gz
Add conversation muting
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 1dfba7a..1e1d90e 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -585,9 +585,10 @@ class Mastodon:
585 return self.__api_request('DELETE', url) 585 return self.__api_request('DELETE', url)
586 586
587 def status_reblog(self, id): 587 def status_reblog(self, id):
588 """Reblog a status. 588 """
589 Reblog a status.
589 590
590 Returns a toot with with a new status that wraps around the reblogged one. 591 Returns a toot dict with a new status that wraps around the reblogged one.
591 """ 592 """
592 url = '/api/v1/statuses/{0}/reblog'.format(str(id)) 593 url = '/api/v1/statuses/{0}/reblog'.format(str(id))
593 return self.__api_request('POST', url) 594 return self.__api_request('POST', url)
@@ -619,6 +620,24 @@ class Mastodon:
619 url = '/api/v1/statuses/{0}/unfavourite'.format(str(id)) 620 url = '/api/v1/statuses/{0}/unfavourite'.format(str(id))
620 return self.__api_request('POST', url) 621 return self.__api_request('POST', url)
621 622
623 def status_mute(self, id):
624 """
625 Mute notifications for a status.
626
627 Returns a toot dict with the now muted status
628 """
629 url = '/api/v1/statuses/{0}/mute'.format(str(id))
630 return self.__api_request('POST', url)
631
632 def status_unmute(self, id):
633 """
634 Unmute notifications for a status.
635
636 Returns a toot dict with the status that used to be muted.
637 """
638 url = '/api/v1/statuses/{0}/unmute'.format(str(id))
639 return self.__api_request('POST', url)
640
622 ### 641 ###
623 # Writing data: Notifications 642 # Writing data: Notifications
624 ### 643 ###
Powered by cgit v1.2.3 (git 2.41.0)