diff options
author | Aljoscha Rittner <[email protected]> | 2022-06-24 15:46:27 +0200 |
---|---|---|
committer | Aljoscha Rittner <[email protected]> | 2022-06-24 15:46:27 +0200 |
commit | 3b8a653fa50e01144864dfcd58ad54a059182bde (patch) | |
tree | 39342f9026c56c430f1dc5796b75011d594eced9 /mastodon | |
parent | e9d2c3d53f7b1d371e5dc5bf47e5fe335b698c85 (diff) | |
download | mastodon.py-3b8a653fa50e01144864dfcd58ad54a059182bde.tar.gz |
Introduces pagin parameters for bookmarks
Fixes #220
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 14 |
1 files changed, 12 insertions, 2 deletions
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: | |||
1633 | # Reading data: Bookmarks | 1633 | # Reading data: Bookmarks |
1634 | ### | 1634 | ### |
1635 | @api_version("3.1.0", "3.1.0", __DICT_VERSION_STATUS) | 1635 | @api_version("3.1.0", "3.1.0", __DICT_VERSION_STATUS) |
1636 | def bookmarks(self): | 1636 | def bookmarks(self, max_id=None, min_id=None, since_id=None, limit=None): |
1637 | """ | 1637 | """ |
1638 | Get a list of statuses bookmarked by the logged-in user. | 1638 | Get a list of statuses bookmarked by the logged-in user. |
1639 | 1639 | ||
1640 | Returns a list of `toot dicts`_. | 1640 | Returns a list of `toot dicts`_. |
1641 | """ | 1641 | """ |
1642 | return self.__api_request('GET', '/api/v1/bookmarks') | 1642 | if max_id != None: |
1643 | max_id = self.__unpack_id(max_id) | ||
1644 | |||
1645 | if min_id != None: | ||
1646 | min_id = self.__unpack_id(min_id) | ||
1647 | |||
1648 | if since_id != None: | ||
1649 | since_id = self.__unpack_id(since_id) | ||
1650 | |||
1651 | params = self.__generate_params(locals()) | ||
1652 | return self.__api_request('GET', '/api/v1/bookmarks', params) | ||
1643 | 1653 | ||
1644 | ### | 1654 | ### |
1645 | # Writing data: Statuses | 1655 | # Writing data: Statuses |