JAVASCRIPT
/*Models*/
var users = [];
function user(userName){
this.displayName = userName || "";
this.id;
this.logoURL;
this.bio;
users.push(this);
}
/*Other possible models appear to be accessible only through authenticated requests. The user model will suffice for now*/
/*Controllers*/
var baseURL= "https://api.twitch.tv/kraken";
var request = new XMLHttpRequest();
var channel = "snowlit";
/*twitch now requires that you register as a developer. Get your clientID as directed here https://dev.twitch.tv/docs#client-id */
var clientID = Math.floor((Math.random() * 100) + 1);
/*https://api.twitch.tv/kraken/channels/test_user1/follows*/
function getFollowers(){
users = request.open('GET',baseURL + '/channels/' + channel + '/follows&' + clientID );
users.forEach(document.createTextNode(item));
}
getFollowers()