Please correct me if I’m wrong, as I only had a quick glance through the ref page.
Missing:
-Top Clips (No way to get total top clips for all channels due to the required query parameters.
-Top Clips Per Channel (No way to get total clips per channel due to the required game id.
(This would be a nice addition for a streamers own personal website to embed their top overall clips, rather than by game ID, or a website that imbedded funny top clips.
For a query to be valid, id (one or more), broadcaster_id, or game_id must be specified. You may specify only one of these parameters.
Game id isn’t required, the only requirement is at least one of those params, so if you want to get all clips per channel you provide just the broadcaster_id
Maintain a cache of the followed channels, and then just refer to that cache rather than querying it each and every time. You’ll still need some requests to maintain that cache but you wont need to do it every single time as followed channels are infrequently changing.
Game names are infrequently changing, same with box art, so rather than bloating the streams endpoint you can simply cache the games endpoint, and when you get a stream with an ID you don’t have in your cache then you query the get games endpoint. There’s no need to keep requesting the same data over and over.
I understand it’s possible to do that, but creating all my own caches that may or may not be accurate at any given time seems like a lot of effort when you could just replace the game ID for the game Name, or include both. Because surely the get streams API is accurate when a streamer updates their game and so it would update the game ID, just seems like small change that would reduce the need for all of these clients to have their own caches.
Glad to know about the top clips, would be nice to have an overall top clips though.
But what you’re suggestion is rather than just those who need the game name doing the lookup, that Twitch add that extra processing internally to ALL Get Streams request, regardless of if developers even need it.
As it currently stands any internal systems at Twitch would only need to provide just the game ID and not do any further lookups, and just those developers who need the game name/box art can request it Those who cache that data (or simply don’t even need it) aren’t being sent data they don’t even need, and Twitch wont have extra overhead on unneeded requests internally.
I get you, but this is an API for devs too, I get Twitch only needs the game ID, but many devs don’t. I thought that was why Twitch had gql private. It’s basically just forcing every single dev to create caches for who knows how many games, causes a much larger amount of CPU power in the long run. It just seems odd that the game ID can be got easier than the game name internally and that it is that much of a problem. I can’t see many other reasons for needing to request the game name from the https://dev.twitch.tv/docs/api/reference#get-games end-point other than to work out what game a streamer is currently playing. Having a game streaming website with a public API that doesn’t return the game name of the stream seems bonkers to me.
I re-read the followed channels part though and that makes sense, can do that as the size is likely to be small.
Not every dev needs to know the game name. For most of us the ID is sufficient.
Game IDs are globally unique, game names are not, so its not odd at all for all references to use that unique ID.
It does return the game name, just not with the Get Streams endpoint.
If you think there’s sufficient need for the name to be included then make your case on UserVoice. If 3rd party devs agree its needed they will vote for it.