aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErin Congden <[email protected]>2017-04-02 20:48:10 -0700
committerErin Congden <[email protected]>2017-04-02 21:52:45 -0700
commit38ebcda76bc0c264f8384f55c5b32bf049b2d6be (patch)
treefe89f43f138415a2a64686202f8029f996c00eda /mastodon
parent36781699c135b3a4cd89973ef2f5079f123a0567 (diff)
downloadmastodon.py-38ebcda76bc0c264f8384f55c5b32bf049b2d6be.tar.gz
Added getting a list of favourited toots
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 1c9ca4b..d42c13f 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -349,6 +349,17 @@ class Mastodon:
349 return self.__api_request('GET', '/api/v1/blocks') 349 return self.__api_request('GET', '/api/v1/blocks')
350 350
351 ### 351 ###
352 # Reading data: Favourites
353 ###
354 def favourites(self):
355 """
356 Fetch the authenticated user's favourited statuses.
357
358 Returns a list of toot dicts.
359 """
360 return self.__api_request('GET', '/api/v1/favourites')
361
362 ###
352 # Writing data: Statuses 363 # Writing data: Statuses
353 ### 364 ###
354 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None): 365 def status_post(self, status, in_reply_to_id = None, media_ids = None, sensitive = False, visibility = '', spoiler_text = None):
@@ -440,7 +451,8 @@ class Mastodon:
440 return self.__api_request('POST', '/api/v1/statuses/' + str(id) + "/favourite") 451 return self.__api_request('POST', '/api/v1/statuses/' + str(id) + "/favourite")
441 452
442 def status_unfavourite(self, id): 453 def status_unfavourite(self, id):
443 """Favourite a status. 454 """
455 Un-favourite a status.
444 456
445 Returns a toot dict with the un-favourited status. 457 Returns a toot dict with the un-favourited status.
446 """ 458 """
Powered by cgit v1.2.3 (git 2.41.0)