Incorrect results due to case sensitivity

Hey guys,

So let us assume that I want to retrieve a list of dota2 streams that are currently online and order them by viewers. The documentation on Github suggests the following: https://api.twitch.tv/kraken/streams?game=dota+2&limit=100

The expected result is a list of all dota2 streams currently online. However, There is this:

  1. //api.twitch.tv/kraken/streams?limit=100&game=dota2
  2. //api.twitch.tv/kraken/streams?limit=100&game=dota%202
  3. //api.twitch.tv/kraken/streams?limit=100&game=Dota%202
  4. //api.twitch.tv/kraken/streams?limit=100&game=Dota2
  5. //api.twitch.tv/kraken/streams?limit=100&game=dota+2
  6. //api.twitch.tv/kraken/streams?limit=100&game=Dota+2

Each and every one of these links returns a result set. Some of them match while others dont. For instance, “dota2”, “Dota2” and “Dota 2” return completely different results. IIRC, I can comma separate the games like this:

https://api.twitch.tv/kraken/streams?limit=100&game=dota2,Dota+2

However, this just seem like a bad request design. It opens up the possibility for missed results due to too many possible combinations. Would it be possible to implement a search on game_id instead? ex.

//api.twitch.tv/kraken/streams?limit=100&game_id=2

Where 2 = all dota2 streams.

PS. I am sorry if there is such a method out there that I am unaware of, I am strictly following the github guidelines!

Thank you for your time!

I think the issue is some people have somehow set the game to the incorrect title.
As far as I have seen it, most of the platform is built around games using string identifiers, where incorrect strings count as unique games.
You can see the behaviour on the site as well by checking http://www.twitch.tv/directory/game/Dota%202 versus http://www.twitch.tv/directory/game/dota%202

I have seen the same thing happening for Arma III (listed as “Arma III” by default, but someone streamed with “Arma 3” instead) The API seems to allow any string.

Exactly what I was referring to. A user should only be able to choose a game that his stream belongs to from a list of games that is already set by the twitch administrators. Unless the current “string” design was done for some particular reason (such as k/v storage), I must say that it is really horrible and could potentially be abused.

RDB wise, a game is not unique anymore. “Dota2” and “Dota 2” are completely different database records. So from a relational perspective, the DB records will inevitably miss-match. I am not really sure what DB engine twitch uses, which could be the reason for this particular behavior. My concern is that in case this type of behavior is existent across twitch, that means that the platform is pretty much wide open for potential future errors due to no-data restrictions.

UML

This is what I expected to be in running in the BG, but it seems like so is not the case.

With all of that being said, how can I get a list of all Dota2 streams?

Bump…

So is there a way to solve this? it seems like I can’t even comma separate games and account for all possible alternatives manually. How should I proceed here? Should I make 10 requests/game? that doesn’t sound good at all!

I think the only solid solution is if Twitch adds validation to the API.

Do the twitch devs usually respond to the threads in this forum?