I’m doing the Twitch API challenge and as far as I can tell, there’s no API data coming through despite the link working fine?
$(document).ready(function(){
var api = "https://wind-bow.gomix.me/twitch-api/streams/freecodecamp";
$.getJSON(api,function(data){
if (data.stream ===null){
$('#test').html("This channel is currently OFFLINE");
}
else{
$('#test').html("This channel is currently ONLINE");
}
});
});
As you can see I’m using FCC’s work around API so I don’t need an API key, the link works correctly for both offline and online twitch channels. I’ve been going over the code for a while now and to my knowledge there doesn’t seem to be anything off. Am I missing something or doing something wrong? Please send help, I’m extremely confused.
Just in case the link to the full project is required for extra help: https://codepen.io/Jobo_v22/pen/NyoEGE?editors=1010