1
00:00:00,210 --> 00:00:02,280
Hey, hey, you made it to the end of the section.

2
00:00:02,370 --> 00:00:04,160
Great job and congratulations.

3
00:00:04,410 --> 00:00:08,370
So this lesson is going to be a quick overview of the code that we've covered earlier.

4
00:00:08,580 --> 00:00:13,350
And we did try to focus on JavaScript, and that's where we got into creating elements and setting the

5
00:00:13,350 --> 00:00:15,330
attributes via JavaScript.

6
00:00:15,450 --> 00:00:18,560
And of course, you can do this in HTML and be quite a bit simpler.

7
00:00:18,720 --> 00:00:22,440
But of course, we did want to focus on JavaScript, so that's why we've done it this way.

8
00:00:22,620 --> 00:00:24,090
And these are optional.

9
00:00:24,330 --> 00:00:31,560
So and the whole lesson and all of the lessons prior was to demonstrate different ways of using JavaScript

10
00:00:31,560 --> 00:00:36,150
in order to connect to APIs, because, of course, every API you connect to will be different.

11
00:00:36,330 --> 00:00:40,050
And in this case, the YouTube API is structured in a certain way.

12
00:00:40,170 --> 00:00:43,870
It's got a lot of content there and there's a lot of content to go through.

13
00:00:44,010 --> 00:00:45,870
So there's a number of different ways to go through there.

14
00:00:46,020 --> 00:00:49,110
And every API, the objects are going to be different.

15
00:00:49,290 --> 00:00:54,510
So you might want to apply different ways that you've seen within the earlier lessons in order to output

16
00:00:54,510 --> 00:00:55,290
that content.

17
00:00:55,380 --> 00:01:02,550
You can just put that content straight or you can use the array prototype map in order to restructure

18
00:01:02,550 --> 00:01:05,940
the array into a more usable and a more uniform format.

19
00:01:06,180 --> 00:01:11,760
So this was another one of those options that you we saw it working before we applied this and then

20
00:01:11,760 --> 00:01:15,240
we applied map afterwards, which made it a lot more readable.

21
00:01:15,450 --> 00:01:18,840
But again, it depends on how you want to structure your content.

22
00:01:19,020 --> 00:01:24,600
And then this was output in that content, still sending it to the show function, which the SO function

23
00:01:24,600 --> 00:01:30,720
takes in the data and then clears the output into HTML and loops through all of the data.

24
00:01:30,870 --> 00:01:35,760
The data are all of the different videos that we've got that's been returned back from the API.

25
00:01:35,910 --> 00:01:39,720
So you can see all of the different videos and there's just a ton of information.

26
00:01:39,840 --> 00:01:45,480
We've restructured it with MAP, so we've taken what's initially presented and we've restructured it

27
00:01:45,480 --> 00:01:48,870
with just the scripts ID image title.

28
00:01:48,870 --> 00:01:54,690
And if you want to see the original how the object came in, there's e-TAG ID kind snippet and then

29
00:01:54,690 --> 00:01:57,780
before we had to go through snippet and we're accessing this information.

30
00:01:57,960 --> 00:02:03,390
So again, it depends on how you want to access it and what you want to access and how your API is structured.

31
00:02:03,660 --> 00:02:08,760
So you created some more elements here, added in a class, updated some of the content that's contained

32
00:02:08,760 --> 00:02:12,960
in there, added in the hyperlink with the video ID.

33
00:02:12,960 --> 00:02:18,600
So linking it to YouTube and using the video ID that's coming from the API, the video title that's

34
00:02:18,600 --> 00:02:24,660
coming from the API, as well as the video description coming from the API, outputting it within our

35
00:02:24,660 --> 00:02:26,610
page, within our local machine.

36
00:02:26,760 --> 00:02:33,450
So we see we've got all of that information being presented on screen that we can use and we can structure

37
00:02:33,450 --> 00:02:34,470
in a number of ways.

38
00:02:34,680 --> 00:02:40,470
This was just a simple example and you can take some success, make it look nice, add in the images

39
00:02:40,470 --> 00:02:43,380
and do a whole bunch of stuff, anything you want.

40
00:02:43,380 --> 00:02:49,950
It's open to extend on the code and apply it and really make it your own and get used to working with

41
00:02:49,950 --> 00:02:51,000
different APIs.

42
00:02:51,510 --> 00:02:57,630
And again, it is important that you do set up a Google account as the one that I've been using and

43
00:02:57,630 --> 00:03:04,590
the API here that I'm using here, stabling this as there are limits to the YouTube API and after a

44
00:03:04,590 --> 00:03:07,860
certain amount of requests, it will cut you off.

45
00:03:08,070 --> 00:03:09,600
So there are request limit.

46
00:03:09,600 --> 00:03:11,760
I want to thank you again for taking the course.

47
00:03:11,760 --> 00:03:15,720
If you have any questions, need clarity on any of the content that was presented.

48
00:03:15,840 --> 00:03:19,410
I'm always happy to help and address those within the Q&amp;A section as well.

49
00:03:19,410 --> 00:03:23,400
If you do have any suggestions for course improvement, I'd love to hear from you.

50
00:03:23,580 --> 00:03:25,140
Thanks again and I'll see you next time.
