Hello,
I want to display all the user Channel of Free Code Camp, but I don’t see anything matching in the JSON respond?
How I know if it’s match my channel?
$.ajax({
url: 'https://api.twitch.tv/kraken/streams',
type: 'POST',
dataType: 'jsonp',
//data: $.param(FccParam ),
data: 'limit=5&q=FreeCodeCamp',
success: function (data, textStatus, jqXHR) {
console.log(data);
for (var j = 0, len = data.streams.length; j < len; j++) {
var img = (data.streams[j].channel.profile_banner !== null)?data.streams[j].channel.profile_banner :'http://lorempixel.com/50/50';
$('ul').append(
'<li class="box__item">'+
'<img class="box__img" src="'+img+'" alt="">'+
'<a class="box__link" href="'+data.streams[j].channel.url +'" title="" target="_blank">'+
data.streams[j].channel.display_name+
'</a>'+
'<p class="box__descriptioon">'+data.streams[j].game+'</p>'+
'</li>')
.addClass('box__item');
}
}
});
answer with limit at 5:
{
"streams": [
{
"_id": 22902181952,
"game": "League of Legends",
"viewers": 24851,
"created_at": "2016-08-19T11:08:17Z",
"video_height": 1080,
"average_fps": 60,
"delay": 0,
"is_playlist": false,
"_links": {
"self": "https://api.twitch.tv/kraken/streams/imaqtpie"
},
"preview": {
"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_imaqtpie-80x45.jpg",
"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_imaqtpie-320x180.jpg",
"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_imaqtpie-640x360.jpg",
"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_imaqtpie-{width}x{height}.jpg"
},
"channel": {
"mature": false,
"status": "i have the knowledge to become the greatest and the mechanics the only thing left before this happens is that i combine them together so com",
"broadcaster_language": "en",
"display_name": "imaqtpie",
"game": "League of Legends",
"language": "en",
"_id": 24991333,
"name": "imaqtpie",
"created_at": "2011-09-22T13:10:14Z",
"updated_at": "2016-08-19T15:04:08Z",
"delay": null,
"logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/imaqtpie-profile_image-8efb10b7bed60d76-300x300.jpeg",
"banner": null,
"video_banner": null,
"background": null,
"profile_banner": null,
"profile_banner_background_color": null,
"partner": true,
"url": "https://www.twitch.tv/imaqtpie",
"views": 151932520,
"followers": 1311292,
"_links": {
"self": "http://api.twitch.tv/kraken/channels/imaqtpie",
"follows": "http://api.twitch.tv/kraken/channels/imaqtpie/follows",
"commercial": "http://api.twitch.tv/kraken/channels/imaqtpie/commercial",
"stream_key": "http://api.twitch.tv/kraken/channels/imaqtpie/stream_key",
"chat": "http://api.twitch.tv/kraken/chat/imaqtpie",
"subscriptions": "http://api.twitch.tv/kraken/channels/imaqtpie/subscriptions",
"editors": "http://api.twitch.tv/kraken/channels/imaqtpie/editors",
"teams": "http://api.twitch.tv/kraken/channels/imaqtpie/teams",
"videos": "http://api.twitch.tv/kraken/channels/imaqtpie/videos"
}
}
},
{
"_id": 22903173616,
"game": "Hearthstone: Heroes of Warcraft",
"viewers": 14079,
"created_at": "2016-08-19T13:01:40Z",
"video_height": 720,
"average_fps": 61.6269515201,
"delay": 0,
"is_playlist": false,
"_links": {
"self": "https://api.twitch.tv/kraken/streams/amazhs"
},
"preview": {
"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_amazhs-80x45.jpg",
"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_amazhs-320x180.jpg",
"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_amazhs-640x360.jpg",
"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_amazhs-{width}x{height}.jpg"
},
"channel": {
"mature": false,
"status": "★AMAZ★ Karazhan Wing 2 POGCHAMP! | Also another episode of Amaz vs. World today too!",
"broadcaster_language": "en",
"display_name": "AmazHS",
"game": "Hearthstone: Heroes of Warcraft",
"language": "en",
"_id": 43356746,
"name": "amazhs",
"created_at": "2013-05-09T16:46:10Z",
"updated_at": "2016-08-19T15:03:50Z",
"delay": null,
"logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/amazhs-profile_image-128bb4f9fe96c7ba-300x300.png",
"banner": null,
"video_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/amazhs-channel_offline_image-fd3a93bf59df2208-1920x1080.jpeg",
"background": null,
"profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/amazhs-profile_banner-27c704c5010f8c8f-480.png",
"profile_banner_background_color": null,
"partner": true,
"url": "https://www.twitch.tv/amazhs",
"views": 58738995,
"followers": 715368,
"_links": {
"self": "https://api.twitch.tv/kraken/channels/amazhs",
"follows": "https://api.twitch.tv/kraken/channels/amazhs/follows",
"commercial": "https://api.twitch.tv/kraken/channels/amazhs/commercial",
"stream_key": "https://api.twitch.tv/kraken/channels/amazhs/stream_key",
"chat": "https://api.twitch.tv/kraken/chat/amazhs",
"subscriptions": "https://api.twitch.tv/kraken/channels/amazhs/subscriptions",
"editors": "https://api.twitch.tv/kraken/channels/amazhs/editors",
"teams": "https://api.twitch.tv/kraken/channels/amazhs/teams",
"videos": "https://api.twitch.tv/kraken/channels/amazhs/videos"
}
}
},
{
"_id": 22901486736,
"game": "Heroes of the Storm",
"viewers": 12518,
"created_at": "2016-08-19T09:32:57Z",
"video_height": 720,
"average_fps": 60.9060906091,
"delay": 0,
"is_playlist": false,
"_links": {
"self": "https://api.twitch.tv/kraken/streams/esl_heroes"
},
"preview": {
"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_heroes-80x45.jpg",
"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_heroes-320x180.jpg",
"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_heroes-640x360.jpg",
"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_esl_heroes-{width}x{height}.jpg"
},
"channel": {
"mature": false,
"status": "Misfits vs. Fnatic - Heroes Europe Fall Regional Semifinal - Live from ESL Arena Alpha Stage @ Gamescom 2016",
"broadcaster_language": "en",
"display_name": "ESL_Heroes",
"game": "Heroes of the Storm",
"language": "en",
"_id": 80380440,
"name": "esl_heroes",
"created_at": "2015-01-20T13:25:24Z",
"updated_at": "2016-08-19T15:04:06Z",
"delay": null,
"logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/esl_heroes-profile_image-2f5c2e0a7c077df1-300x300.png",
"banner": null,
"video_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/esl_heroes-channel_offline_image-5c787ac2274cce01-1920x1080.jpeg",
"background": null,
"profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/esl_heroes-profile_banner-572863147147bba7-480.jpeg",
"profile_banner_background_color": "#030a38",
"partner": true,
"url": "https://www.twitch.tv/esl_heroes",
"views": 4797211,
"followers": 64184,
"_links": {
"self": "https://api.twitch.tv/kraken/channels/esl_heroes",
"follows": "https://api.twitch.tv/kraken/channels/esl_heroes/follows",
"commercial": "https://api.twitch.tv/kraken/channels/esl_heroes/commercial",
"stream_key": "https://api.twitch.tv/kraken/channels/esl_heroes/stream_key",
"chat": "https://api.twitch.tv/kraken/chat/esl_heroes",
"subscriptions": "https://api.twitch.tv/kraken/channels/esl_heroes/subscriptions",
"editors": "https://api.twitch.tv/kraken/channels/esl_heroes/editors",
"teams": "https://api.twitch.tv/kraken/channels/esl_heroes/teams",
"videos": "https://api.twitch.tv/kraken/channels/esl_heroes/videos"
}
}
},
{
"_id": 22904410400,
"game": "Dota 2",
"viewers": 11700,
"created_at": "2016-08-19T14:57:11Z",
"video_height": 1080,
"average_fps": 30,
"delay": 0,
"is_playlist": false,
"_links": {
"self": "https://api.twitch.tv/kraken/streams/funn1k"
},
"preview": {
"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_funn1k-80x45.jpg",
"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_funn1k-320x180.jpg",
"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_funn1k-640x360.jpg",
"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_funn1k-{width}x{height}.jpg"
},
"channel": {
"mature": false,
"status": "\"Пусть погорят\" и горят они ясно честно.",
"broadcaster_language": "ru",
"display_name": "Funn1k",
"game": "Dota 2",
"language": "ru",
"_id": 36389882,
"name": "funn1k",
"created_at": "2012-09-23T10:52:52Z",
"updated_at": "2016-08-19T15:04:18Z",
"delay": null,
"logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/funn1k-profile_image-ff2634f59c557199-300x300.jpeg",
"banner": null,
"video_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/funn1k-channel_offline_image-6dff78fb8c314142-1920x1080.jpeg",
"background": null,
"profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/funn1k-profile_banner-4b8fbf42c51e36da-480.jpeg",
"profile_banner_background_color": null,
"partner": true,
"url": "https://www.twitch.tv/funn1k",
"views": 13142975,
"followers": 101625,
"_links": {
"self": "http://api.twitch.tv/kraken/channels/funn1k",
"follows": "http://api.twitch.tv/kraken/channels/funn1k/follows",
"commercial": "http://api.twitch.tv/kraken/channels/funn1k/commercial",
"stream_key": "http://api.twitch.tv/kraken/channels/funn1k/stream_key",
"chat": "http://api.twitch.tv/kraken/chat/funn1k",
"subscriptions": "http://api.twitch.tv/kraken/channels/funn1k/subscriptions",
"editors": "http://api.twitch.tv/kraken/channels/funn1k/editors",
"teams": "http://api.twitch.tv/kraken/channels/funn1k/teams",
"videos": "http://api.twitch.tv/kraken/channels/funn1k/videos"
}
}
},
{
"_id": 22901302688,
"game": "Gaming Talk Shows",
"viewers": 11450,
"created_at": "2016-08-19T09:04:45Z",
"video_height": 720,
"average_fps": 30,
"delay": 0,
"is_playlist": false,
"_links": {
"self": "https://api.twitch.tv/kraken/streams/jolygolf"
},
"preview": {
"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_jolygolf-80x45.jpg",
"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_jolygolf-320x180.jpg",
"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_jolygolf-640x360.jpg",
"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_jolygolf-{width}x{height}.jpg"
},
"channel": {
"mature": false,
"status": "СТРИМ-МАРАФОН 24ЧАСА",
"broadcaster_language": "ru",
"display_name": "Jolygolf",
"game": "Gaming Talk Shows",
"language": "ru",
"_id": 54804025,
"name": "jolygolf",
"created_at": "2014-01-11T15:51:21Z",
"updated_at": "2016-08-19T15:04:11Z",
"delay": null,
"logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/jolygolf-profile_image-36b921b0d3b403bd-300x300.png",
"banner": null,
"video_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/jolygolf-channel_offline_image-da4511eefe872592-1920x1080.png",
"background": null,
"profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/jolygolf-profile_banner-1ae188359f5bb2b0-480.png",
"profile_banner_background_color": "#050605",
"partner": true,
"url": "https://www.twitch.tv/jolygolf",
"views": 3378908,
"followers": 135262,
"_links": {
"self": "http://api.twitch.tv/kraken/channels/jolygolf",
"follows": "http://api.twitch.tv/kraken/channels/jolygolf/follows",
"commercial": "http://api.twitch.tv/kraken/channels/jolygolf/commercial",
"stream_key": "http://api.twitch.tv/kraken/channels/jolygolf/stream_key",
"chat": "http://api.twitch.tv/kraken/chat/jolygolf",
"subscriptions": "http://api.twitch.tv/kraken/channels/jolygolf/subscriptions",
"editors": "http://api.twitch.tv/kraken/channels/jolygolf/editors",
"teams": "http://api.twitch.tv/kraken/channels/jolygolf/teams",
"videos": "http://api.twitch.tv/kraken/channels/jolygolf/videos"
}
}
}
],
"_total": 17622,
"_links": {
"self": "https://api.twitch.tv/kraken/streams?limit=5&offset=0",
"next": "https://api.twitch.tv/kraken/streams?limit=5&offset=5",
"featured": "https://api.twitch.tv/kraken/streams/featured",
"summary": "https://api.twitch.tv/kraken/streams/summary",
"followed": "https://api.twitch.tv/kraken/streams/followed"
}
}
Thanks