diff --git a/docs/index.rst b/docs/index.rst index f9915e6..9dc37e5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 1c9ca4b..d42c13f 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -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. """