From 38ebcda76bc0c264f8384f55c5b32bf049b2d6be Mon Sep 17 00:00:00 2001 From: Erin Congden Date: Sun, 2 Apr 2017 20:48:10 -0700 Subject: Added getting a list of favourited toots --- mastodon/Mastodon.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mastodon') 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. """ -- cgit v1.2.3