Missing some streamers between pagination requests

I’m using the endpoint //api.twitch.tv/kraken/streams?game=League%20Of%20Legends&limit=25&offset=0 to get a list of streamers playing a certain game. Each time the user scrolls to the end of the page it calls this with an increased offset. Sometimes when (I’m presuming) a streamer get’s more viewers they get pushed to the previous page and isn’t then display on my site.

I simple can’t think of a way to solve this in short of calling progressively larger requests to get all streamers up until x offset. I’m just wondering if anyone has a solution that won’t involve such large requests whilst maintaining accuracy in viewer number or at least showing all the streamers playing that game.

You can’t reliably get all names since different pages (offsets) can also be cached in different states.

How would Twitch be doing this then? Because whilst scrolling you can see that previous games (for example) update, as well as some get inserted into there respective positions based on viewers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.