1
00:00:00,780 --> 00:00:06,780
During the last few days, we built a program which access data from a rest API.

2
00:00:06,810 --> 00:00:15,210
Now that Rest API was built by other people, but today you learn how to build your own rest API in

3
00:00:15,210 --> 00:00:15,840
Python.

4
00:00:16,610 --> 00:00:21,800
And what you're looking at is the actual API that we will piece together.

5
00:00:22,600 --> 00:00:27,320
So this page is actually the documentation of the API that we will build.

6
00:00:27,340 --> 00:00:35,020
So the API has a home page, just like the new API has a home page where you could see the documentation

7
00:00:35,020 --> 00:00:36,220
how to use the API.

8
00:00:37,880 --> 00:00:41,400
So what we've got here is some minimal documentation.

9
00:00:41,420 --> 00:00:45,320
It tells you what the format of the end point is.

10
00:00:45,500 --> 00:00:48,560
So that's the base URL up to here.

11
00:00:48,560 --> 00:00:57,080
And then you can provide a citation and the date and that will give you temperature data about that

12
00:00:57,080 --> 00:00:58,100
particular station.

13
00:00:58,130 --> 00:01:03,050
Now, down here, you'll see a list of stations that's.

14
00:01:04,420 --> 00:01:08,500
About 6500 of them.

15
00:01:08,500 --> 00:01:10,180
So that's a lot of stations.

16
00:01:10,570 --> 00:01:14,200
And these are stations across Europe.

17
00:01:16,730 --> 00:01:24,550
So, for example, if you want the station in Stockholm, that station has a station idea of ten.

18
00:01:24,560 --> 00:01:30,950
So if you want weather for Stockholm for a particular date, you'd access an entry points like this.

19
00:01:31,250 --> 00:01:34,490
So station and date, you see, the date is at the end.

20
00:01:34,520 --> 00:01:40,720
So 1988 is the year ten is the month and 25 is the date.

21
00:01:40,730 --> 00:01:44,430
So 25th of October, 1988.

22
00:01:44,450 --> 00:01:46,280
So if we click that URL.

23
00:01:47,570 --> 00:01:49,280
So that's the URL.

24
00:01:50,380 --> 00:01:55,290
With that end point, what you get is this JSON data.

25
00:01:55,300 --> 00:01:58,910
So we have this pair of data.

26
00:01:58,930 --> 00:02:05,800
So the data we requested the station ID and then we get the temperature, which is what the user wants.

27
00:02:06,010 --> 00:02:13,570
So the temperature for that day, the average temperature for that day was -0.9 Celsius degree.

28
00:02:17,160 --> 00:02:22,140
Similarly, you can enter here any station number.

29
00:02:23,400 --> 00:02:25,320
So let's change the URL to something else.

30
00:02:25,320 --> 00:02:34,290
For example, from ten we make it 14 the same date and you see that the temperature for that date was

31
00:02:34,290 --> 00:02:35,010
11.

32
00:02:35,070 --> 00:02:41,460
So station number 14 was Salzburg in Austria.

33
00:02:42,290 --> 00:02:47,180
So those are weather observation stations and so that's the API.

34
00:02:47,510 --> 00:02:55,040
So that's a lot of data that I'll give you and you'll use this data to serve them through your API.

35
00:02:55,400 --> 00:02:59,210
So there's a lot of fun stuff to learn and extremely useful.

36
00:02:59,240 --> 00:03:02,750
So let's keep going and I'll see you in the next video.

