Iterating through streams misses some streams

Order of streams is dynamically changing, because as view count of streams do. This causes iterating through count some streams multiple times, and some streams not be noticed at all.

Because of this, when you scroll through twitch streams and dynamically load new ones, some streams you won’t even see, while some you will see multiple times.
The same happens with browsing games API.

No streamer would like to not be shown in his game category, and when viewer sees two same streams it can be confusing.

When I measured it on bigger scale, that means iterating through all (about 20k) live streams. Up to 200 streams get skipped, and some streams are being counted up to 5 times.

I was wondering if it is possible to add some sort of cursoring to streams/games API, as it is the case with /channel/:name/follow

If you mean that this is a problem affecting you and your application you could just iterate over the streams while increasing offset slightly less than the limit:

offset: 0   limit: 100
offset: 80  limit: 100
offset: 160 limit: 100
offset: ...

while keeping each channel name in a set to discard duplicates. It is most likely using the next link that causes problems for you. If you just want to alert Twitch development staff I think a mail would be more appropriate.

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