Getting info from API (simple)

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:

url: '',
type: 'GET',
contentType: 'application/json',
dataType: 'jsonp',
success: function(data) {
$.each([0], function(index, value){
   //console.log("AJAX " +[1];
   console.log("ID: " + index + value);

   $(".twitch-widget").append("<img src='" + value + "'>");
1 Like

Hi I’m also strarting to use the API. Can you clarify me what stands the index for?

Take a look at what you’re iterating over. $.each([0] says “Take the top game, iterate over it’s boxart, and do something with each url”. You likely want $.each( which says “Iterate over the top games”. Then you’d get the boxart with

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.