diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-13 12:27:06 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-13 12:27:06 +0200 |
commit | 95ae148f45210f73f2c3e951ec3cc33531a239fe (patch) | |
tree | a842ef59b8b5dfee9e1b7e00515940c6d8bb0fc8 /docs | |
parent | 0bc2963419833cfeeb4fe2aceba63ee1239cabb5 (diff) | |
download | mastodon.py-95ae148f45210f73f2c3e951ec3cc33531a239fe.tar.gz |
add remote parameter, filtering by date for masto mainline
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/docs/index.rst b/docs/index.rst index cfa9bf0..650a497 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -121,15 +121,22 @@ Many of Mastodons API endpoints are paginated. What this means is that if you re | |||
121 | data from them, you might not get all the data at once - instead, you might only get the | 121 | data from them, you might not get all the data at once - instead, you might only get the |
122 | first few results. | 122 | first few results. |
123 | 123 | ||
124 | All endpoints that are paginated have four parameters: since_id, max_id, min_id and | 124 | All endpoints that are paginated have four parameters: `since_id`, `max_id`, `min_id` and |
125 | limit. since_id allows you to specify the smallest id you want in the returned data, but | 125 | `limit`. `since_id` allows you to specify the smallest id you want in the returned data, but |
126 | you will still always get the newest data, so if there are too many statuses between | 126 | you will still always get the newest data, so if there are too many statuses between |
127 | the newest one and since_id, some will not be returned. min_id, on the other hand, gives | 127 | the newest one and `since_id`, some will not be returned. `min_id`, on the other hand, gives |
128 | you statuses with that minimum id and newer, starting at the given id. max_id, similarly, | 128 | you statuses with that minimum id and newer, starting at the given id. `max_id`, similarly, |
129 | allows you to specify the largest id you want. By specifying either min_id or max_id | 129 | allows you to specify the largest id you want. By specifying either min_id or `max_id` |
130 | (generally, only one, not both) of them you can go through pages forwards and backwards. | 130 | (generally, only one, not both, though specifying both is supported starting with Mastodon |
131 | 131 | version 3.3.0) of them you can go through pages forwards and backwards. | |
132 | limit allows you to specify how many results you would like returned. Note that an | 132 | |
133 | On Mastodon mainline, you can, pass datetime objects as IDs, since the IDs used are | ||
134 | Snowflake IDs and dates can be approximately converted to those. This is guaranteed | ||
135 | to work on mainline Mastodon servers and very likely to work on all forks, but will | ||
136 | **not** work on other servers implementing the API, like Pleroma, Misskey or Gotosocial. | ||
137 | You should not use this if you want your application to be universally compatible. | ||
138 | |||
139 | `limit` allows you to specify how many results you would like returned. Note that an | ||
133 | instance may choose to return less results than you requested - by default, Mastodon | 140 | instance may choose to return less results than you requested - by default, Mastodon |
134 | will return no more than 40 statues and no more than 80 accounts no matter how high | 141 | will return no more than 40 statues and no more than 80 accounts no matter how high |
135 | you set the limit. | 142 | you set the limit. |