Flat list of streams for followed games

I don’t believe there’s a way to pull all the streams of a user’s followed games in one go. There is access to pull which games are currently being streamed, but to get all of said streams it requires cycling through each game; if the user follows a lot of popular games it can make an obnoxious amount of API requests.

I don’t know how streams are cached on Twitch’s end but a list similar to following or hosts would be great instead of mundanely checking each game. Checking each manually is rather slow and tabbing them all is even slower.

There is if you have the user_read scope.
Check the API HERE

stream_type -- optional -- string -- Only shows streams from a certain type. Permitted values: all, playlist, live

The default value is live, which is what causes not all stream showing up by default

Edit: I realized I may just be mistaken here - I’m sorry I can not test this currently.
Since the other two values are “playlist” and “live”, it may just be that “all” will not show offline streams but just both of the other types. API is vague in this.

It doesn’t list the streams of followed games, though. Maybe it could if they added stream_type=games, but alas.

You would need to make a request to

https://api.twitch.tv/api/users/{user_login}/follows/games/live

That would generate a list like this: https://gist.github.com/xangold/355e6e4861e40e396dcf024cbbde1d94

{
   "_total":3,
   "follows":[
      {
         "viewers":2989,
         "channels":418,
         "game":{
            "name":"ARK",
            "_id":489635,
            "giantbomb_id":49642,
            "box":{
               "large":"https://static-cdn.jtvnw.net/ttv-boxart/ARK-272x380.jpg",
               "medium":"https://static-cdn.jtvnw.net/ttv-boxart/ARK-136x190.jpg",
               "small":"https://static-cdn.jtvnw.net/ttv-boxart/ARK-52x72.jpg",
               "template":"https://static-cdn.jtvnw.net/ttv-boxart/ARK-{width}x{height}.jpg"
            },
            "logo":{
               "large":"https://static-cdn.jtvnw.net/ttv-logoart/ARK-240x144.jpg",
               "medium":"https://static-cdn.jtvnw.net/ttv-logoart/ARK-120x72.jpg",
               "small":"https://static-cdn.jtvnw.net/ttv-logoart/ARK-60x36.jpg",
               "template":"https://static-cdn.jtvnw.net/ttv-logoart/ARK-{width}x{height}.jpg"
            },
            "properties":{

            },
            "_links":{

            }
         }
      }
   ]
}

In order to get the streams from those, you would need to make kraken/streams requests for each game.

Then I guess this is a request for a call for a list of the games’ streams so it doesn’t require cycling through each game for the streams.

Unless a short bursts of API requests are fine, then I suppose it wouldn’t matter.

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