I am working on an app that will allow you to find a random stream and I am trying to figure out a better way to do it.
Currently I have to do a get request to https://api.twitch.tv/kraken/streams/ to get the total streams and then another get request to https://api.twitch.tv/kraken/streams/?offset= to go to a random page.
The process is pretty slow because I have to do 2 get requests each time a search is attempted. Is there an easier way to do this?
I came across https://api.twitch.tv/kraken/streams/random but it does not seem to work with any queries. Is there a way to make this work with a game query such as https://api.twitch.tv/kraken/streams/random/?game=
Any suggestions would be helpful!