-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Pagination' section of the spec is basically a lie #1523
Comments
I think the action here is to make sure that /messages (and its interaction with the tokens returned by /sync, /context, /search, etc) is adequately documented, and then kill the section. |
i think this might be a slight overstatement - i think there's some value in the various APIs which do pagination having the same shape (i.e. a chunks array, and a prev_batch and next_batch results which give opaque tokens which can be fed back to the API to go backwards & forwards, and whose tokens point to the gaps between objects in the chunks sequence). And I think other APIs /do/ follow this a bit? |
Previously the section was very strict in what pagination was, however this isn't the reality for the matrix specification. Several endpoints have their own pagination naming conventions and do not follow those mandated by this section. This commit generalizes the language to cover those endpoints while also describing how pagination works. In particular, it describes the rough API shape to expect and how to deal with the responses. This commit also removes the `M_BAD_PAGINATION` error as it is not used in the real world. Homeservers are instead encouraged to use the standard `M_INVALID_PARAM` or similar error code. Fixes matrix-org#610 Fixes matrix-org#1523
There's a whole section in the spec about 'pagination', with the implication that lots of endpoints in the CS API follow the same pattern. In fact, the only one that I think follows this pattern is /messages, and others (/publicRooms, /notifications, /search) use different systems.
There's also an
M_BAD_PAGINATION
error code which I would be surprised to discover is actually used.The text was updated successfully, but these errors were encountered: