Twitch status api online/offline

Like this?

$(document).ready(function() {
url -H ‘Accept: application/vnd.twitchtv.v5+json’
-H ‘Client-ID: xxxxxxxxxxxxxxxxxxxxx’
-X GET https://api.twitch.tv/kraken/streams/

$("#chg").click(function() {
    var name = document.getElementById("input").value;
    name = name.toLowerCase();
    getChannelInfo(name);
    isOnline(name);
});

function getChannelInfo(username) {
    var url = 'https://api.twitch.tv/kraken/channels/' +username;
    $.ajaxSetup({
       headers : {
'Client-ID': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx' //bad
       }
    });        

and in the script

user_id instead of user_name?