Add conversation muting

pull/83/head
Lorenz Diener 2017-09-08 16:34:11 +02:00
rodzic 84b463ce1d
commit 517f47083d
2 zmienionych plików z 23 dodań i 2 usunięć

Wyświetl plik

@ -435,6 +435,8 @@ interact with already posted statuses.
.. automethod:: Mastodon.status_unreblog
.. automethod:: Mastodon.status_favourite
.. automethod:: Mastodon.status_unfavourite
.. automethod:: Mastodon.status_mute
.. automethod:: Mastodon.status_unmute
.. automethod:: Mastodon.status_delete
Writing data: Notifications

Wyświetl plik

@ -585,9 +585,10 @@ class Mastodon:
return self.__api_request('DELETE', url)
def status_reblog(self, id):
"""Reblog a status.
"""
Reblog a status.
Returns a toot with with a new status that wraps around the reblogged one.
Returns a toot dict with a new status that wraps around the reblogged one.
"""
url = '/api/v1/statuses/{0}/reblog'.format(str(id))
return self.__api_request('POST', url)
@ -619,6 +620,24 @@ class Mastodon:
url = '/api/v1/statuses/{0}/unfavourite'.format(str(id))
return self.__api_request('POST', url)
def status_mute(self, id):
"""
Mute notifications for a status.
Returns a toot dict with the now muted status
"""
url = '/api/v1/statuses/{0}/mute'.format(str(id))
return self.__api_request('POST', url)
def status_unmute(self, id):
"""
Unmute notifications for a status.
Returns a toot dict with the status that used to be muted.
"""
url = '/api/v1/statuses/{0}/unmute'.format(str(id))
return self.__api_request('POST', url)
###
# Writing data: Notifications
###