1
00:00:00,330 --> 00:00:07,620
All right, so let's go step by step and probably your first question is why do we go here with our

2
00:00:08,039 --> 00:00:09,780
API and then version one?

3
00:00:10,140 --> 00:00:12,680
And essentially that is just a convention.

4
00:00:12,870 --> 00:00:19,500
We need to understand that on the server, we also might have different routes, not just the routes

5
00:00:19,500 --> 00:00:20,320
for the API.

6
00:00:20,790 --> 00:00:28,230
So, for example, you could be serving a indexed page here on the fourth, meaning there could be a

7
00:00:28,440 --> 00:00:32,369
nice index page that you're serving up over here.

8
00:00:32,670 --> 00:00:37,620
And then also on the same server, you have the API routes.

9
00:00:37,980 --> 00:00:45,480
So convention is effectively just to signal that all of these are the API routes.

10
00:00:45,840 --> 00:00:52,230
Now, as far as the version well, as you're setting up the API, eventually you might want to change

11
00:00:52,230 --> 00:00:52,710
some things.

12
00:00:53,010 --> 00:00:59,070
So it's easier if you have this version, because that way when you create a new one, then you can

13
00:00:59,070 --> 00:01:04,019
just direct everybody to API and then version two, three or whatever.

14
00:01:04,319 --> 00:01:10,470
And while we're still on that same note, why don't we navigate to a hacker news one to one that I showed

15
00:01:10,470 --> 00:01:17,340
you previously with Algoma, and you'll notice exactly the same setup where essentially they go with

16
00:01:17,340 --> 00:01:22,550
domain and then forward slash and then API and then version number one.

17
00:01:22,830 --> 00:01:29,760
And that leads me to my next point where if you're ever in doubt or if you're just interested on different

18
00:01:29,760 --> 00:01:32,610
setups, just check out the different APIs.

19
00:01:32,940 --> 00:01:39,150
There's tons of APIs out there and you can just look for one and take a look at that set up and then

20
00:01:39,150 --> 00:01:41,880
decide if what they're doing makes sense to you.

21
00:01:42,100 --> 00:01:44,670
Then of course, you can implement in your project.

22
00:01:44,670 --> 00:01:50,340
If not, then just move on to a different API and eventually you'll find a setup that makes the most

23
00:01:50,340 --> 00:01:51,000
sense to you.

24
00:01:51,880 --> 00:01:57,010
After that, you're probably wondering, OK, I understand the Apple II and then version, that kind

25
00:01:57,010 --> 00:01:59,590
of makes sense, but why do we go here?

26
00:01:59,590 --> 00:02:07,390
We get and then tasks, then we have the post and the same tasks and then forget patch and delete.

27
00:02:07,630 --> 00:02:13,510
We go to the tasks, but then we're looking forward to going, why isn't this written in a different

28
00:02:13,510 --> 00:02:18,670
way where we're just looking for a single task or something along those lines?

29
00:02:19,150 --> 00:02:23,110
And to give you a short answer, that is a convention.

30
00:02:23,260 --> 00:02:28,000
But since there's more to it, I want to actually cover that in few videos.

31
00:02:28,390 --> 00:02:32,470
So I want to set up the basic roots with just some simple responses.

32
00:02:32,740 --> 00:02:37,570
Then I want to open up the postman and do a little bit of setup over there.

33
00:02:37,760 --> 00:02:44,140
And then right before we start setting up the database, I actually want to spend one video on just

34
00:02:44,140 --> 00:02:45,520
talking about the convention.

35
00:02:45,730 --> 00:02:51,850
And then lastly, if you remember in tutorial we worked with Put and now for the update we're using

36
00:02:51,850 --> 00:02:52,300
Patch.

37
00:02:52,450 --> 00:02:56,710
And I know that this might be a little bit frustrating to you, but that's also going to be something

38
00:02:56,710 --> 00:03:02,080
that we will cover a bit later once we have already a working application.

39
00:03:02,470 --> 00:03:08,650
Because that way, I believe that I can give you a solid example of the differences between the put

40
00:03:08,650 --> 00:03:09,310
and patch.

41
00:03:09,620 --> 00:03:11,740
That's about it for the general root structure.

42
00:03:12,100 --> 00:03:13,690
So now let's start implementing it.

