1
00:00:00,840 --> 00:00:06,630
OK, so now that we are done with understanding the concepts, whatever we have understood, like async

2
00:00:06,630 --> 00:00:11,760
await promises, Brian Cage, now we will implement all of that in our project.

3
00:00:12,080 --> 00:00:14,010
But first of all, we will define this function.

4
00:00:14,010 --> 00:00:19,830
We will make this function, which we call it on the on click button that does get weather info.

5
00:00:20,190 --> 00:00:22,850
Who will find this function here?

6
00:00:22,870 --> 00:00:23,760
That will be.

7
00:00:25,570 --> 00:00:27,250
Constantly back.

8
00:00:28,440 --> 00:00:31,900
But they're in for and this will be equal to a federal function.

9
00:00:35,230 --> 00:00:43,120
And so this will be some content to define the function, and now let me just tell you how you will

10
00:00:43,120 --> 00:00:47,950
use it and the use effect took use effect took of.

11
00:00:49,690 --> 00:00:55,180
This expects function to function basically.

12
00:00:56,500 --> 00:00:57,260
All right.

13
00:00:57,280 --> 00:01:02,380
And here you will be provided and dependency.

14
00:01:02,380 --> 00:01:07,570
It seems that the use effect we want to call this function, which is the good.

15
00:01:09,670 --> 00:01:15,580
But they're informed because we want to call this function on every page.

16
00:01:15,700 --> 00:01:25,690
The fresh and the dependency era is empty, which means that this function will be called only when

17
00:01:26,140 --> 00:01:30,910
the page refreshes for the first time, like for the first time, and then it will not like only one,

18
00:01:31,150 --> 00:01:32,320
this functional scooter.

19
00:01:32,740 --> 00:01:36,460
And after that, it will be not executed just once it would be executed.

20
00:01:36,460 --> 00:01:39,850
Right now, let's go to the.

21
00:01:41,170 --> 00:01:48,910
Get other info function, so here we will, right to try and catch blocks, which we just discussed.

22
00:01:49,600 --> 00:01:53,650
So this will be having curly braces inside this.

23
00:01:54,680 --> 00:02:00,940
We also have a catch for that, so we will define it later as inside the try and inside the tile.

24
00:02:00,970 --> 00:02:05,920
Let me just tonight let you wait until we hear we'll provide you all you are.

25
00:02:05,920 --> 00:02:11,980
All means the endpoint, the API endpoint, which will be which will be fitting data for us.

26
00:02:12,280 --> 00:02:14,530
OK, so here we'll be using that.

27
00:02:14,680 --> 00:02:18,430
So let me take you to the browser where from where we'll find this.

28
00:02:20,310 --> 00:02:21,180
We'll find it here.

29
00:02:21,400 --> 00:02:23,550
So this is the end point, basically.

30
00:02:24,680 --> 00:02:25,310
And.

31
00:02:27,430 --> 00:02:28,950
Let me just comment.

32
00:02:29,920 --> 00:02:30,250
Mr.

33
00:02:30,370 --> 00:02:30,610
Yes.

34
00:02:31,460 --> 00:02:34,120
So let me find my EPA.

35
00:02:36,020 --> 00:02:37,190
I've posted it here.

36
00:02:37,820 --> 00:02:39,380
I've commented it invested here.

37
00:02:41,120 --> 00:02:44,630
Give it a little space, little clean.

38
00:02:45,830 --> 00:02:51,410
Let me just go to the browser and let me find my key inside my Yankees.

39
00:02:52,500 --> 00:02:55,230
So this one, I'll be using one.

40
00:02:56,320 --> 00:02:59,560
Then I'll go back to my I.D..

41
00:03:00,770 --> 00:03:03,250
And had they stood?

42
00:03:05,320 --> 00:03:10,690
Alright, alright, alright, alright, now let me check if this is working inside the.

43
00:03:11,760 --> 00:03:12,300
Browser.

44
00:03:14,820 --> 00:03:20,220
Who is today inside the city named, we will provide a city name, which is.

45
00:03:21,910 --> 00:03:22,420
And by.

46
00:03:24,800 --> 00:03:30,170
OK, RPA is worth considering we just copy this, you know, and this will be used by us.

47
00:03:31,260 --> 00:03:36,900
Now, let's go back to the business to be a good, and we'll provide you all here.

48
00:03:37,750 --> 00:03:38,290
OK.

49
00:03:39,240 --> 00:03:39,720
There the other.

50
00:03:40,860 --> 00:03:42,330
And we did build this coming.

51
00:03:43,060 --> 00:03:47,900
Now what we're going to do is how do we have provided this name Mumbai by ourselves?

52
00:03:47,960 --> 00:03:55,470
But I warned us that it's time to get past there because the certitude the city, which the user researching

53
00:03:55,470 --> 00:03:59,670
that should be parsed here and that data should be returned, respectively for that.

54
00:04:00,200 --> 00:04:01,140
Think ahead.

55
00:04:01,200 --> 00:04:06,910
I'll be providing backpacks because I'll be using ActionScript five insiders.

56
00:04:06,940 --> 00:04:08,250
That will be the.

57
00:04:09,450 --> 00:04:18,930
Like the rebel I'd be passing here, so I will delete Mumbai and here I'll be providing or or sign.

58
00:04:20,640 --> 00:04:27,090
And clearly racist inside this do, providing the search.

59
00:04:29,200 --> 00:04:31,300
All righty, all righty.

60
00:04:31,660 --> 00:04:35,080
So next, let me just turn on the word breast.

61
00:04:37,670 --> 00:04:38,480
Looks clean.

62
00:04:39,430 --> 00:04:44,850
Looks clean and next will go on somewhat dirty.

63
00:04:46,190 --> 00:04:54,310
So inside this now will capture the desert, so like there is.

64
00:04:54,530 --> 00:04:58,180
So this is the variable which really capturing that there was none of it.

65
00:04:58,340 --> 00:05:04,370
We are using of it, which means why we are using our weight because we are waiting for that data to

66
00:05:04,370 --> 00:05:07,850
come back and we are passing that.

67
00:05:07,850 --> 00:05:09,350
You are allowed inside the fetch.

68
00:05:10,700 --> 00:05:16,940
Next, we are converting that data to Jason, so that will also take some time.

69
00:05:16,940 --> 00:05:18,840
So I'll wait for the restart.

70
00:05:19,380 --> 00:05:26,450
Jason, this raises variable and dark descent will convert into Jason form if it's not in Jason.

71
00:05:26,810 --> 00:05:29,000
Like this is the precautionary thing, right?

72
00:05:29,420 --> 00:05:34,130
So if that does not convert into Jason, so this will convert into Jason.

73
00:05:34,670 --> 00:05:35,420
All righty.

74
00:05:36,020 --> 00:05:47,030
So I think now we got the data and after this, after the pride thing, we will write the catch.

75
00:05:47,420 --> 00:05:53,390
If there is an error we like and get inside, this feels like.

76
00:05:54,530 --> 00:05:56,720
At our award, spelling.

77
00:05:57,110 --> 00:06:02,360
And people just try eat like you can possibly also catch an error.

78
00:06:03,260 --> 00:06:07,280
So does that would be a console?

79
00:06:08,780 --> 00:06:13,890
Just log it will console.log the error, why are?

80
00:06:15,280 --> 00:06:16,080
Mistake of her.

81
00:06:16,480 --> 00:06:16,830
All right.

82
00:06:17,080 --> 00:06:19,960
So this will console and log the error message.

83
00:06:20,470 --> 00:06:27,100
So let me just console and console log the data console log log.

84
00:06:28,190 --> 00:06:35,270
That data or data is what is converted into Jason, right, so that I will be converting, so now I

85
00:06:35,270 --> 00:06:36,230
have to save this.

86
00:06:36,770 --> 00:06:38,480
And let me start off the server.

87
00:06:40,570 --> 00:06:42,880
So let me start the sidebar.

88
00:06:44,480 --> 00:06:48,850
So because we need to run it in on browsers, let me just go to the website.

89
00:06:48,890 --> 00:06:55,820
I mean, the directory and that was that then will write and PMS sorry.

90
00:06:56,760 --> 00:06:58,390
So this will start our server.

91
00:06:59,930 --> 00:07:02,600
And it can take a few seconds because.

92
00:07:04,200 --> 00:07:09,840
It generally takes that time, so I hope this is clear to you because now we have.

93
00:07:11,690 --> 00:07:14,670
The API and the endpoint is also go.

94
00:07:15,230 --> 00:07:19,830
So this is giving us the hope to receive the data.

95
00:07:20,880 --> 00:07:29,130
Now we are getting it out of hand, which is unresolved, unexpected as our word that is of it.

96
00:07:29,550 --> 00:07:31,290
So what do you mean by this?

97
00:07:31,470 --> 00:07:39,330
Because I've already told you you cannot use of it if you are not using this thing like a weight is

98
00:07:39,330 --> 00:07:41,340
always used inside a thing.

99
00:07:41,350 --> 00:07:44,790
So here you will make this function async by.

100
00:07:46,020 --> 00:07:47,370
Providing a sink.

101
00:07:48,780 --> 00:07:50,790
Alike is think.

102
00:07:51,910 --> 00:07:54,740
Now, if I save it, I should look.

103
00:07:55,670 --> 00:07:56,150
All right.

104
00:07:56,690 --> 00:08:00,350
This works and let us go to the browser.

105
00:08:02,920 --> 00:08:04,390
And let me just.

106
00:08:05,500 --> 00:08:10,990
And let me go to the console, select me to see if something is being returned or not.

107
00:08:11,020 --> 00:08:13,980
Yes, yes, yes, we are getting data.

108
00:08:14,950 --> 00:08:16,840
That's what we were expecting, right?

109
00:08:16,990 --> 00:08:18,130
We are getting data.

110
00:08:19,080 --> 00:08:19,710
So.

111
00:08:21,630 --> 00:08:27,540
The wind speed and everything we are getting, that is what we wanted to check on, API is working fine,

112
00:08:27,540 --> 00:08:28,530
we are getting it.

113
00:08:29,040 --> 00:08:31,200
Like according to need.

114
00:08:31,970 --> 00:08:33,830
So that's all.

115
00:08:34,320 --> 00:08:36,000
Now we will move, move further.

116
00:08:36,000 --> 00:08:36,270
Okay?

117
00:08:36,660 --> 00:08:40,110
How do we make this to the side and the side?

118
00:08:41,190 --> 00:08:41,640
Yes.

119
00:08:41,880 --> 00:08:45,540
Agnes will now be unable to like view properly.

120
00:08:45,960 --> 00:08:47,070
So now we are.

121
00:08:47,320 --> 00:08:49,350
We want this data like, what do you know?

122
00:08:49,350 --> 00:08:58,350
The data is very much scattered for like there are areas that are object inside out is how you will

123
00:08:58,350 --> 00:09:00,600
get the data, how you will fetch that data.

124
00:09:01,140 --> 00:09:02,690
So that's a challenge.

125
00:09:03,310 --> 00:09:08,310
We need to understand the structure and then you need to just get that data.

126
00:09:08,950 --> 00:09:12,210
So now we'll get the data one by one.

127
00:09:12,210 --> 00:09:19,260
We'll be structure this so that this quality is restructuring, that it will be the right one by one.

128
00:09:20,130 --> 00:09:21,930
And get that data.
