diff options
author | Aljoscha Rittner <[email protected]> | 2022-06-24 16:27:04 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-24 16:27:04 +0200 |
commit | 002c6511a7c6a340efdaee15849a31afa38871fc (patch) | |
tree | ebbd901539c6ce418f1874fb183db89725baa405 /mastodon | |
parent | 243d7a2c55df788738a4f86978ffac149fde89bd (diff) | |
parent | 3b8a653fa50e01144864dfcd58ad54a059182bde (diff) | |
download | mastodon.py-002c6511a7c6a340efdaee15849a31afa38871fc.tar.gz |
Merge pull request #238 from arittner/bookmarks-paging
Introduces paging parameters for bookmarks
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 4c7cb62..8b0afb3 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 |