Get multiple streams JSON data from twitch API -
there 2 json calls , call #2 working. don't have idea first 1 (multiple streams).
(i know of say: "go , read docs right there", didn't me much. https://github.com/justintv/twitch-api/blob/master/v2_resources/streams.md)
call #1:
$.getjson("h ttps://api.twitch.tv/kraken/streams?channel=viagamehs,starladder1.json?callback=", function(response){ response = json.stringify(response); objonline = jquery.parsejson(response); alert(response); }); call #2:
$.getjson("h ttps://api.twitch.tv/kraken/streams/viagamehs_ru.json?callback=?", function(response){ response = json.stringify(response); objonline = jquery.parsejson(response); alert(response); });
the right code:
$.getjson("https://api.twitch.tv/kraken/streams.json?channel=viagamehs,starladder1&callback=?", function(response){ response = json.stringify(response); console.log(response); });
Comments
Post a Comment