Pagination controls aren't particularly useful for position-remembering clients. #5819
Closed
1 of 2 tasks
Labels
api
REST API, Streaming API, Web Push API
I'm trying to update Amaroq to remember timeline position between restarts or view refreshes. As such, I was hoping to be able to use the
max_id
andsince_id
parameters to control which toots we get back from the API.However, these parameters don't seem to to work quite the way I expected. They are effectively unusable for this "remember timeline position" use case and we would have to resort to a sequential spam of the timeline API to get enough toots to get us down to the remembered one.
Take a peek at the head of the timeline.
Pretend like we're starting up and we remember having seen 99066949753677356 at the top of our timeline:
Issue 1 note that the max_Id isn't actually in the list of returned statuses. So if we wanted to show a view of all the things that the user was looking at before and we stored the id of the topmost toot, we would somehow still need to get one more toot from the timeline to restore the previous state.
Now lets say we want a page of toots since the topmost one we're currently seeing:
Issue 2: instead of getting the next three messages after the one we asked for, we get three messages that are after the one we asked for, starting with the head of the timeline. So to get the actual "previous" page, we'd have to page through a bunch of requests.
I guess what would be nice is a new pair of parameters like
up_to_id=[id]
which returns a page of results with the first one having id[id]
after_id=[id]
which returns a page of results with the last one being the exact next toot after (newer than)[id]
.master
(If you're a user, don't worry about this).The text was updated successfully, but these errors were encountered: