Hi,
I was using this script:
function CheckOnlineStatus()
{
$.getJSON("https://api.twitch.tv/kraken/streams/" + channelName, function(channel)
{
if (channel["stream"] == null)
{
alert(nickname+" is not online");
} else {
alert(nickname+" is online!");
}
});
}
Now this isn’t working anymore since you need the clientID now.
I registered it and I got my Client ID.
Can you tell me how I can implement the client ID to this script?!
The variables:
- channelName
- nickname
are globals. It’s just the channel name to look for (live or not) and nickname is just a good looking formatted name of this channel.
I made the script short. It have more things in it.
But this should be enough to understand.
Thanks a lot for your help!
EDIT
I use that (a similar script like that) in my chrome extension.
This extension checks every X minutes if a stream is online.
So basically I have to give this script a header with the Client-ID.
IF possible I would not want to use Jquery. But it wouldn’t be a problem at all.
Because my extension already use Jquery. If this script (above) is not working with client id anymore.
Maybe someone can make me a JQuery variant with:
- alert not online
- alert online
So I can use that with my longer script version. Thanks.