Hey, hey, you made it to the end of the section.
Great job and congratulations.
So this lesson is going to be a quick overview of the code that we've covered earlier.
And we did try to focus on JavaScript, and that's where we got into creating elements and setting the
attributes via JavaScript.
And of course, you can do this in HTML and be quite a bit simpler.
But of course, we did want to focus on JavaScript, so that's why we've done it this way.
And these are optional.
So and the whole lesson and all of the lessons prior was to demonstrate different ways of using JavaScript
in order to connect to APIs, because, of course, every API you connect to will be different.
And in this case, the YouTube API is structured in a certain way.
It's got a lot of content there and there's a lot of content to go through.
So there's a number of different ways to go through there.
And every API, the objects are going to be different.
So you might want to apply different ways that you've seen within the earlier lessons in order to output
that content.
You can just put that content straight or you can use the array prototype map in order to restructure
the array into a more usable and a more uniform format.
So this was another one of those options that you we saw it working before we applied this and then
we applied map afterwards, which made it a lot more readable.
But again, it depends on how you want to structure your content.
And then this was output in that content, still sending it to the show function, which the SO function
takes in the data and then clears the output into HTML and loops through all of the data.
The data are all of the different videos that we've got that's been returned back from the API.
So you can see all of the different videos and there's just a ton of information.
We've restructured it with MAP, so we've taken what's initially presented and we've restructured it
with just the scripts ID image title.
And if you want to see the original how the object came in, there's e-TAG ID kind snippet and then
before we had to go through snippet and we're accessing this information.
So again, it depends on how you want to access it and what you want to access and how your API is structured.
So you created some more elements here, added in a class, updated some of the content that's contained
in there, added in the hyperlink with the video ID.
So linking it to YouTube and using the video ID that's coming from the API, the video title that's
coming from the API, as well as the video description coming from the API, outputting it within our
page, within our local machine.
So we see we've got all of that information being presented on screen that we can use and we can structure
in a number of ways.
This was just a simple example and you can take some success, make it look nice, add in the images
and do a whole bunch of stuff, anything you want.
It's open to extend on the code and apply it and really make it your own and get used to working with
different APIs.
And again, it is important that you do set up a Google account as the one that I've been using and
the API here that I'm using here, stabling this as there are limits to the YouTube API and after a
certain amount of requests, it will cut you off.
So there are request limit.
I want to thank you again for taking the course.
If you have any questions, need clarity on any of the content that was presented.
I'm always happy to help and address those within the Q&A section as well.
If you do have any suggestions for course improvement, I'd love to hear from you.
Thanks again and I'll see you next time.