This issue may be related to the recent streams related API changes on kraken.
Before I’m going to describe the issue, I just want to say that I’m fully aware which parameters are documented and which are not (and thus unsupported). However, everything was working fine until today/yesterday.
Now to the issue:
First, the (documented/supported) language
streams parameter has stopped working entirely.
Unfiltered query:
$ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: YOUR_CLIENT_ID" \
"https://api.twitch.tv/kraken/streams?limit=3" \
| jq -r ".streams[] | .channel.name"
lec
rubius
montanablack88
Query filtered by language=en
:
$ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: YOUR_CLIENT_ID" \
"https://api.twitch.tv/kraken/streams?limit=3&language=en" \
| jq -r ".streams[] | .channel.name"
lec
rubius
montanablack88
Query filtered by language=de
:
$ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: YOUR_CLIENT_ID" \
"https://api.twitch.tv/kraken/streams?limit=3&language=de" \
| jq -r ".streams[] | .channel.name"
lec
rubius
montanablack88
As you can see, this parameter is now completely ignored and streams are not filtered by “language” anymore.
Second, the (undocumented) broadcaster_language
streams parameter has stopped working if more than one value is set.
Query with one value (de
):
$ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: YOUR_CLIENT_ID" \
"https://api.twitch.tv/kraken/streams?limit=3&broadcaster_language=de" \
| jq -r ".streams[] | .channel.name"
montanablack88
gronkh
therealknossi
Query with two values (en,de
):
$ curl -s \
-H "Accept: application/vnd.twitchtv.v5+json" \
-H "Client-ID: YOUR_CLIENT_ID" \
"https://api.twitch.tv/kraken/streams?limit=3&broadcaster_language=en,de" \
| jq
{
"streams": []
}
As said above, I am fully aware that this parameter is not documented and thus unsupported. The reason why my application is using this parameter for filtering streams by language is that the language
parameter doesn’t filter properly and is useless. broadcaster_language
is filtering the stream’s actual language, whereas language
only filters the channel’s language, which doesn’t necessarily have to be the streaming language.
What’s surprising here is that language
stopped working, while broadcaster_language
is still working fine, unless multiple values are set. The multiple values syntax (comma separated list) was used by the Twitch website prior to the GQL switch.