diff options
author | Lorenz Diener <[email protected]> | 2019-04-27 23:11:37 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-04-27 23:11:37 +0200 |
commit | dc6c80bad74dd22ebe1d75869e99bc3f735380b5 (patch) | |
tree | e026e472981f50e215cb03d879db7c59a8269c48 /docs | |
parent | 72e3290d8c9ed1dc0babf66ef70a6835a0dcacf4 (diff) | |
download | mastodon.py-dc6c80bad74dd22ebe1d75869e99bc3f735380b5.tar.gz |
Implement, document and test pagination changes
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/index.rst b/docs/index.rst index a7d2945..952db50 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -120,10 +120,13 @@ Many of Mastodons API endpoints are paginated. What this means is that if you re | |||
120 | data from them, you might not get all the data at once - instead, you might only get the | 120 | data from them, you might not get all the data at once - instead, you might only get the |
121 | first few results. | 121 | first few results. |
122 | 122 | ||
123 | All endpoints that are paginated have three parameters: since_id, max_id and limit. | 123 | All endpoints that are paginated have four parameters: since_id, max_id, min_id and |
124 | since_id allows you to specify the smallest id you want in the returned data. max_id, | 124 | limit. since_id allows you to specify the smallest id you want in the returned data, but |
125 | similarly, allows you to specify the largest. By specifying either one (generally, | 125 | you will still always get the newest data, so if there are too many statuses between |
126 | only one, not both) of them you can go through pages forwards and backwards. | 126 | the newest one and since_id, some will not be returned. min_id, on the other hand, gives |
127 | you statuses with that minimum id and newer, starting at the given id. max_id, similarly, | ||
128 | allows you to specify the largest id you want. By specifying either min_id or max_id | ||
129 | (generally, only one, not both) of them you can go through pages forwards and backwards. | ||
127 | 130 | ||
128 | limit allows you to specify how many results you would like returned. Note that an | 131 | limit allows you to specify how many results you would like returned. Note that an |
129 | instance may choose to return less results than you requested - by default, Mastodon | 132 | instance may choose to return less results than you requested - by default, Mastodon |