Looking for Help to complete TWITCH TV project

Looking for Help to complete TWITCH TV project
0.0 0

#1

Dear Campers,

I have been working on the twitch API project since last month.
I have been stuck in some problems. They are:

*How can I add a header to an async await request. shall I join it to the API URL??

*To make a request I need channels _Id but I have channel name only. I read the developer docs but all the examples were demonstrated with Channel_Id which I don’t have.

Please, can anyone guide?

Thanks in advance.

Here is my Pen.


Having a problem in Wikipedia api while using async await?
#2

Many Thanks for the advices again.
@TomerPacific i will try my best to rectify these.
It’s wonderful getting feedback n advices.

This is the first time i discussed with anyone while learning online otherwise i just always did them by reading answers for other people querries.

One more question is (sorry for asking too many questions, maybe this is last one ). I have been reading on the forums about some issues in Twitch.tv project.
So, shall I work on it or can skip it?
Please guide.


#3

@Abd.Qadir,
I think that you learn something from every project here, so I would definitely recommend doing it.
Regarding the twitch project, a simple search on this forum will grant you a plethora of advice on how you can finish the project successfully.

Good luck


#4

@TomerPacific

Thanks much
I have started it.

will reach you if I get stuck.

:+1::+1::+1:


#5

Hi @TomerPacific It has been almost a month.
Due to my procrastination habit, I have still not been able to complete the project.

Disturbing you again for some silly problems. They are:

*How can I add a header to an async await request. shall I join it to the API URL??

*To make a request I need channels _Id but I have channel name only. I read the developer docs but all the examples were demonstrated with Channel_Id which I don’t have. Please guide.

Here is my Pen


#6

My pen in Codpen

sorry i forgot to add the link


#7

I merged your posts in the Wikipedia thread with this knew, because they really do belong in a separate thread.


#8

@randelldawson Thanks.

But I have not received any help yet.:slightly_frowning_face::slightly_frowning_face:


#9

Seriously Guys.

I am stuck in this and have no clue to proceed further.

Please anyone give me a hint what to do with my code now.


#10

I think you are confusing Client_ID with channel_ID. Did you sign up for a Twitch account? Is that where you got the Client_ID of iub6uayeg63o7tkywwscce5nqtx2kd? My suggestion is to use the end points provided my Free Code Camp (https://wind-bow.glitch.me/) where you do not need a Client_ID. Instead, FCC has already set up an account and the end points are made via a proxy (via glitch.me), so you do not have to use a Client_ID (no need to use header:{ Client_ID: iub6uayeg63o7tkywwscce5nqtx2kd } in your code).

You have an array named channelNames containing channel_IDs which you can use for the 3 possible endpoints shown in the link I provided you above.

In the success function, you will get a response back from the API specified in stream_URL. I see that you have a console.log statement where you view the response argument, but you are not using the response to build your html. Instead, I see the following:

$(".all-streamers").append(streamerDisplaySetup(logoLink, channelLink, streamerTitle, streaming));

You are making a call to streamDisplaySetup and are attempting to pass logoLink, channelLink, streamerTitle, streaming arguments to it, but you have not assigned any values from the response to these variables. You need to do that first or streamDisplaySetup will not have any data to return useful html.


#11

Thanks a lot @randelldawson

Yes, I got that Client_ID by creating an account on Twitch. I will use the alternate glitch.me endpoint now without any header.

I was about to comment that line.
My first mission was to bring the response to the console. Then I would put the data from the response as the argument for the streamerDisplaySetup function.

Thanks again :+1::+1:


#12

You could still go the route of using your own Twitch account (using the Client_ID), but you would still have to deal with using the response as I described in the last part of my reply.


#13

Hi @randelldawson @TomerPacific

Big Thanks to you all.

I completed my Twitch project today after a very long time. I know It took me very long but I also believe every person has his own learning speed. Mine is slower :roll_eyes::roll_eyes: maybe.
Actually, when I got stuck with problems of this project badly, I paused working on it and moved on to Intermediate Algorithm Scripting.

However, I am very happy to see my achievement.

Here is my pen for your review.

Also (If you dont mind) Please advise me what tactics can I adopt to learn and complete project faster that this.


#14

@randelldawson

Any feedback/criticism, please. :roll_eyes: