TwitchTV getJSON help

TwitchTV getJSON help
0

#1

Can’t seem to get JSON data to return. Copying and pasting the url into a new window returns the exact data I want. What am I missing?

 $(document).ready(function() {
  var streamUrl = "https://wind-bow.gomix.me/twitch-api/streams/";
  var users = [
    "ESL_SC2",
    "OgamingSC2",
    "cretetion",
    "freecodecamp",
    "storbeck",
    "habathcx",
    "RobotCaleb",
    "noobs2ninjas"
  ];

  users.forEach(function(user) {
    $.getJSON(streamUrl + user, function(data) {
      console.log(JSON.stringify(data));
    });
  });
});

#3

Works great. Thanks!


#4

https://www.quora.com/What-does-callback-mean-in-a-URI-when-making-a-call-to-an-API-using-AJAX