3 ms·
Quite a nice idea, well done! Very minimalist and clean as well. Few pieces of feedback after playing with it for a few minutes- Not sure if I'm getting unluck
by paraxisi 6y ago
Quite a nice idea, well done! Very minimalist and clean as well. Few pieces of feedback after playing with it for a few minutes-
Not sure if I'm getting unlucky or the results are cached but quite a few of the streamers who popped up were offline. Using the twitch api under the hood I assume?
- mumphster 6y agoYa due to the way getting acess to this works, theres a 10 minute cache of active streams that get expired in redis and a cron job pulls in a fresh list
- the_duke 6y agoIf you are not already, you could use the GraphQL API that the web app uses, which provides sorting by viewers ASC. That would allow for much more up to date results than iterating the full list with the official API. Not sure how happy Twitch is about external users, but it can be accessed quite easily with some tinkering.
- mumphster 6y agoThis is exactly what its doing, albeit caching results, somce im trying to be nice. Official api sadly does not allow sorting by asc.
- VectorLock 6y agoHopefully they're cool about it. Typically companies like this frown upon ersatz API usage and cache/rehosting of their data.
- riteshpatel 6y agoIs there a reason for a 10 minute cache duration? Even 1 minute would be fine from a performance point of view
- mumphster 6y agoSo I'm not hitting the api too much, this is going through a roundabout way to get this data