From 0f92f778dc2c4ce2b1737383fc574d0de032659a Mon Sep 17 00:00:00 2001 From: ZEN Date: Sun, 14 Feb 2021 08:38:34 +0200 Subject: __json_truefalse_parse: fix a typo --- mastodon/Mastodon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 98ac72a..4c7cb62 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -3230,7 +3230,7 @@ class Mastodon: if (key in json_object and isinstance(json_object[key], six.text_type)): if json_object[key].lower() == 'true': json_object[key] = True - if json_object[key].lower() == 'False': + if json_object[key].lower() == 'false': json_object[key] = False return json_object -- cgit v1.2.3 From 3b8a653fa50e01144864dfcd58ad54a059182bde Mon Sep 17 00:00:00 2001 From: Aljoscha Rittner Date: Fri, 24 Jun 2022 15:46:27 +0200 Subject: Introduces pagin parameters for bookmarks Fixes #220 --- mastodon/Mastodon.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 98ac72a..e87599b 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1633,13 +1633,23 @@ class Mastodon: # Reading data: Bookmarks ### @api_version("3.1.0", "3.1.0", __DICT_VERSION_STATUS) - def bookmarks(self): + def bookmarks(self, max_id=None, min_id=None, since_id=None, limit=None): """ Get a list of statuses bookmarked by the logged-in user. Returns a list of `toot dicts`_. """ - return self.__api_request('GET', '/api/v1/bookmarks') + if max_id != None: + max_id = self.__unpack_id(max_id) + + if min_id != None: + min_id = self.__unpack_id(min_id) + + if since_id != None: + since_id = self.__unpack_id(since_id) + + params = self.__generate_params(locals()) + return self.__api_request('GET', '/api/v1/bookmarks', params) ### # Writing data: Statuses -- cgit v1.2.3