News for hackers. Stuff that matters.
Re:Paginating Requests in APIs (2020) by amelius on Saturday May 28, 2022 @02:22PM (#31542513)
You just say "this cursor + 5 pages", for example.
Re:Paginating Requests in APIs (2020) by hombre_fatal on Saturday May 28, 2022 @03:06PM (#31542820)
You send `GET /items[?cursor=<cursor>]` to my server.

I respond:

    [
        "items": [ {...}, {...}, {...}, ... ],
        "next_cursor": "77963b7a"
    ]
How do you request "this cursor + 5 pages"?
Re:Paginating Requests in APIs (2020) by amelius on Saturday May 28, 2022 @03:24PM (#31542958)
GET /items?cursor=77963b7a&add_to_cursor=5pages
Re:Paginating Requests in APIs (2020) by ignaciochiazzo on Tuesday May 31, 2022 @11:42PM (#31577792)
I strongly suggest not doing this since the application will be implementing `offset` in that scenario. This is the same as having Page-based pagination but with a cursor that acts a filter/sorting blob.