So I’m new to twitch API, and been playing around with it a bit and got a little hang to it.
Altho im trying to load all the games, like “browse” on the site it self. But i cant seem to get it to work.
Can some one help me on this please?
SO far, i can load one game, with all the pictures. I want all games, and with the medium picture.
This is how far I’ve gotten:
$.ajax({
url: 'https://api.twitch.tv/kraken/games/top',
type: 'GET',
contentType: 'application/json',
dataType: 'jsonp',
success: function(data) {
$.each(data.top[0].game.box, function(index, value){
//console.log("AJAX " + data.top[1].game.name);
console.log("ID: " + index + value);
$(".twitch-widget").append("<img src='" + value + "'>");
})
}
});