Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tushar Singh
Courses Plus Student 8,692 PointsTwitch Api
I am not sure how to use twitch api, it all seems very confusing.
https://github.com/justintv/Twitch-API
I want to create an app in which I can check which Twitchers are online and offline. 1 thing I am sure of, I would use the streams object https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streams
I can use the "logo"," display_name" and probably the "status".
I saw hundreds of these kinda apps in codepen using channels object, why would I need to use this channel object, it's little bit confusing.https://github.com/justintv/Twitch-API/blob/master/v3_resources/channels.md#get-channel
They all are looking same to me ;(
Where do I start ?? Please help !!!!
Tushar Singh
Courses Plus Student 8,692 PointsOk it's funny nobody is answering my question and I am answering it myself :O
2 Answers
jack AM
2,618 PointsDid you end up figuring it out?
Tushar Singh
Courses Plus Student 8,692 Pointsya kind of. http://codepen.io/tushar_13/full/ZWvOwg/
Now I have a new problem, when I click the online button, I want to see only those channels who are online and same with the offline section, I am a little sceptical how to accomplish that.
Second thing, I want to use input section to search trough the channels; I think that i would use the keuup function and may be use the indexOf. Any suggestions?
Tushar Singh
Courses Plus Student 8,692 PointsTushar Singh
Courses Plus Student 8,692 PointsOk now I think, I know Why I need channels as well, because when the channel is not streaming I don't have any data to access from. It would look like this https://api.twitch.tv/kraken/streams/freecodecamp
So to get access to the logo or a name of the twitcher I would use the channel.It looks like this https://api.twitch.tv/kraken/channels/freecodecamp
So correct me if I am wrong, when the stream is null I would access the logo and name,etc etc from the channels and when the channel is streaming, I can get the data from the streams itself. Am I right?