Hey there
Noticed around last Thursday or Friday (August 29/30) that the name for the game Z1 Battle Royale
was changed back to H1Z1
. This is all well and good except that there are a few inconsistencies when trying to fetch information from the API that are also mirrored on Twitch.tv.
Details:
Endpoint: https://api.twitch.tv/helix/games?id=417892&id=511815
Response:
{
"data": [
{
"id": "511815",
"name": "H1Z1",
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/H1Z1-{width}x{height}.jpg"
},
{
"id": "417892",
"name": "H1Z1",
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/H1Z1-{width}x{height}.jpg"
}
]
}
Endpoint: https://api.twitch.tv/helix/games?name=H1Z1
Response:
{
"data": [
{
"id": "511815",
"name": "H1Z1",
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/H1Z1-{width}x{height}.jpg"
}
]
}
So the ID 511815
is clearly the winner, except that the v5 endpoint for top_games
is returning results from both IDs.
This can be confirmed by going to https://www.twitch.tv/search?term=h1z1
. Clicking on either of the results will bring you to the 511815
version, but the 417892
version is still accessible through https://www.twitch.tv/directory/game/z1%20battle%20royale
. I’m surprised the ES query is giving me the right one when I click on them
Another similar issue I ran into was involving another game: MudRunner
Endpoint: https://api.twitch.tv/helix/games?name=MudRunner
Reponse:
{
"data": [
{
"id": "498821",
"name": "MudRunner",
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/MudRunner-{width}x{height}.jpg"
}
]
}
Endpoint: https://api.twitch.tv/helix/games?id=498821
Response:
{
"data": [
{
"id": "498821",
"name": "Spintires: MudRunner",
"box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/./Spintires:%20MudRunner-{width}x{height}.jpg"
}
]
}
Hmm, this seems a little strange as well. Let me double check by calling…
Endpoint: https://api.twitch.tv/helix/games?name=Spintires: MudRunner
Response:
{
"data": []
}
https://www.twitch.tv/directory/game/mudrunner
is the URL that exists on twitch, as Spintires: Mudrunner
gives me a 404. I’m just confused why the API would return a game name that it clearly doesn’t have any data for, as evidenced by the api call for the name rather than ID.
Any help or transparency regarding these issues would be greatly appreciated.
Thanks