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