Added getting a list of favourited toots
This commit is contained in:
pare
36781699c1
commit
38ebcda76b
S'han modificat 2 arxius amb 20 adicions i 1 eliminacions
|
@ -247,6 +247,13 @@ muted or blocked by the logged in user.
|
|||
.. automethod:: Mastodon.mutes
|
||||
.. automethod:: Mastodon.blocks
|
||||
|
||||
Reading data: Favourites
|
||||
------------------------
|
||||
This function allows you to get information about statuses favourited
|
||||
by the authenticated user.
|
||||
|
||||
.. authomethod:: Mastodon.favourites
|
||||
|
||||
Writing data: Statuses
|
||||
----------------------
|
||||
These functions allow you to post statuses to Mastodon and to
|
||||
|
|
|
@ -348,6 +348,17 @@ class Mastodon:
|
|||
"""
|
||||
return self.__api_request('GET', '/api/v1/blocks')
|
||||
|
||||
###
|
||||
# Reading data: Favourites
|
||||
###
|
||||
def favourites(self):
|
||||
"""
|
||||
Fetch the authenticated user's favourited statuses.
|
||||
|
||||
Returns a list of toot dicts.
|
||||
"""
|
||||
return self.__api_request('GET', '/api/v1/favourites')
|
||||
|
||||
###
|
||||
# Writing data: Statuses
|
||||
###
|
||||
|
@ -440,7 +451,8 @@ class Mastodon:
|
|||
return self.__api_request('POST', '/api/v1/statuses/' + str(id) + "/favourite")
|
||||
|
||||
def status_unfavourite(self, id):
|
||||
"""Favourite a status.
|
||||
"""
|
||||
Un-favourite a status.
|
||||
|
||||
Returns a toot dict with the un-favourited status.
|
||||
"""
|
||||
|
|
Loading…
Referencia en una nova incidència