I’m new to JavaScript, and new to the Twitch API, so I apologize if this has already been asked.
I’m using the following url to get stream information as JSON. It works for one user, but if I try to get JSON for multiple users by separating the user id’s by commas, it does not work.
For example, this works (request one user’s stream):
var url = "https://api.twitch.tv/kraken/streams/ESL_SC2?client_id=uoxr3607rgh8dhn3ybwc0lnd2ikltx";
$.getJSON(url, function(response) {
console.log(response);
}
But this does not (requesting more than one user’s stream):
var url = "https://api.twitch.tv/kraken/streams/ESL_SC2,OgamingSC2?client_id=uoxr3607rgh8dhn3ybwc0lnd2ikltx";
$.getJSON(url, function(response) {
console.log(response);
}
Is there a way I can return JSON for more than one stream in one url? I’d like to do it for about 9 or 10 streams total. Thanks for any ideas.