Add conversation muting

This commit is contained in:
Lorenz Diener 2017-09-08 16:34:11 +02:00
pare 84b463ce1d
commit 517f47083d
S'han modificat 2 arxius amb 23 adicions i 2 eliminacions

Veure arxiu

@ -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

Veure arxiu

@ -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
###