1
00:00:00,680 --> 00:00:01,880
In this video.

2
00:00:01,880 --> 00:00:06,640
Let's test the endpoint that we created in the previous video.

3
00:00:06,740 --> 00:00:09,670
So here that is for the ten lines.

4
00:00:09,680 --> 00:00:17,370
Click on that and click on collections for this one is going to represent each model for our purpose.

5
00:00:17,390 --> 00:00:24,410
We have three models, posts, users and comments, so let's create one folder for each model.

6
00:00:24,410 --> 00:00:28,790
So I'll click on that and name this one as users.

7
00:00:29,150 --> 00:00:36,230
The next collection is going to be post and lastly, it's going to be comments.

8
00:00:36,620 --> 00:00:39,020
So let's start with the user.

9
00:00:39,020 --> 00:00:47,210
So let me collapse this one and here I'm going to add requests and I would name this one as registered.

10
00:00:47,630 --> 00:00:54,860
And if you have used Postman before, it looks the same, but this one looks cleaner because the interface

11
00:00:54,860 --> 00:00:56,120
is really simple.

12
00:00:56,240 --> 00:01:04,519
All right, so let's change the method to post and then the you are going to be a tt p column for slide

13
00:01:04,519 --> 00:01:10,130
four slash Luca host and then Colon 9000.

14
00:01:10,220 --> 00:01:17,840
Then first, like the endpoint when I be the API version one, let's start from the users, which is

15
00:01:17,840 --> 00:01:26,660
this API version one users and register so I can copy this one and here I'm going to paste that.

16
00:01:27,050 --> 00:01:27,410
All right.

17
00:01:27,410 --> 00:01:35,300
So when I hit send, you can see that I go back the response, so I will save it by clicking on command

18
00:01:35,300 --> 00:01:40,910
S or control S And let me add the log in also.

19
00:01:40,940 --> 00:01:47,300
So I'll right click and then duplicate and change this one to look in.

20
00:01:48,740 --> 00:01:56,960
And the end point here is look, in its end, where there is no endpoint for look in, I believe within

21
00:01:56,980 --> 00:02:06,950
either one or sorry, I need to add the forward slash here and send we have look in the next one is

22
00:02:06,950 --> 00:02:09,500
going to be single user.

23
00:02:09,500 --> 00:02:12,920
So here I'm going to duplicate this one.

24
00:02:13,660 --> 00:02:18,010
And Renee, I would change this one to details.

25
00:02:18,550 --> 00:02:24,360
And for this, it's going to be get requests and force like some random ID.

26
00:02:24,370 --> 00:02:27,490
So our hit send, I have it.

27
00:02:27,550 --> 00:02:32,140
The next one is going to be the profile.

28
00:02:32,140 --> 00:02:33,280
So.

29
00:02:34,110 --> 00:02:39,360
Let me collapse this one, and here I'm going to duplicate this one.

30
00:02:41,770 --> 00:02:45,160
And change this one to profile.

31
00:02:47,830 --> 00:02:54,910
And then here we're going to be forced slash profile and then the ID and I have it.

32
00:02:55,480 --> 00:03:00,100
The next one is going to be the upload.

33
00:03:00,100 --> 00:03:07,560
So let me copy this one as that profile photo upload.

34
00:03:07,570 --> 00:03:08,890
So here.

35
00:03:09,890 --> 00:03:11,690
Duplicate this one.

36
00:03:13,080 --> 00:03:19,800
And change this one to profile image upload.

37
00:03:23,360 --> 00:03:27,050
And the end point is this.

38
00:03:27,890 --> 00:03:35,060
Four west large file photo upload and some ID, so let me use any ID here when I be put request.

39
00:03:36,270 --> 00:03:43,530
And I have it is that the next endpoint is going to be uploading the cover image.

40
00:03:43,530 --> 00:03:44,640
So here.

41
00:03:44,670 --> 00:03:48,810
So let me change this one to cover image upload.

42
00:03:50,340 --> 00:04:00,750
All right, so inside the tender client, let me duplicate this one and change this one to cover photo

43
00:04:00,750 --> 00:04:01,500
upload.

44
00:04:02,910 --> 00:04:06,210
And change this one to cover.

45
00:04:08,290 --> 00:04:09,380
And it's st.

46
00:04:09,400 --> 00:04:10,960
I have it down here.

47
00:04:12,630 --> 00:04:15,630
The next is the password.

48
00:04:15,630 --> 00:04:21,540
So I would copy this one also and duplicate this one.

49
00:04:23,410 --> 00:04:26,740
And change this one to update password.

50
00:04:28,990 --> 00:04:35,430
And let me paste here as that and hit send.

51
00:04:35,440 --> 00:04:40,090
Well, let me check the update is put request.

52
00:04:40,570 --> 00:04:42,820
Yeah, we have it api.

53
00:04:42,850 --> 00:04:43,570
Oh sorry.

54
00:04:43,570 --> 00:04:46,990
I need to remove this one from here.

55
00:04:48,030 --> 00:04:48,760
Oh right.

56
00:04:48,760 --> 00:04:50,860
So let's hit send better.

57
00:04:50,870 --> 00:04:54,270
So we have the same error API users.

58
00:04:54,280 --> 00:04:55,060
Oh sorry.

59
00:04:55,360 --> 00:04:57,850
Remove this one API four.

60
00:04:57,850 --> 00:04:59,020
Slash this.

61
00:05:00,320 --> 00:05:00,860
All right.

62
00:05:00,860 --> 00:05:01,700
It worked.

63
00:05:02,090 --> 00:05:04,410
So let's look at the update.

64
00:05:04,430 --> 00:05:10,520
So we already are the update of a user so we can go ahead and then add that one.

65
00:05:10,520 --> 00:05:14,000
So let me copy this one and down here.

66
00:05:15,660 --> 00:05:24,510
And I would change this one to use an update or update for a slash ID And here is going to be update

67
00:05:25,050 --> 00:05:27,630
and here, user update.

68
00:05:28,170 --> 00:05:28,680
All right.

69
00:05:28,680 --> 00:05:34,770
So let me come back here and duplicate this one.

70
00:05:35,660 --> 00:05:36,560
Rename.

71
00:05:37,700 --> 00:05:39,920
And user update.

72
00:05:43,240 --> 00:05:49,690
So we're going to be as updates with some ID and we have it down here.

73
00:05:50,320 --> 00:05:50,710
All right.

74
00:05:50,710 --> 00:05:52,390
That is it about the user.

75
00:05:52,440 --> 00:05:54,460
So let's start with the Post.

76
00:05:54,460 --> 00:05:55,060
Sorry.

77
00:05:55,600 --> 00:05:58,170
The next one going to be the log out.

78
00:05:58,180 --> 00:06:04,960
So let me add one here for look out.

79
00:06:05,230 --> 00:06:06,040
Sorry.

80
00:06:10,450 --> 00:06:11,710
Look out.

81
00:06:13,300 --> 00:06:15,610
And it's gets requests.

82
00:06:15,610 --> 00:06:20,320
So we're going to be users and look out.

83
00:06:20,710 --> 00:06:21,190
All right.

84
00:06:21,190 --> 00:06:23,280
So that is it about the uses.

85
00:06:23,290 --> 00:06:27,490
So let's collapse this once and let's start with the post.

86
00:06:28,030 --> 00:06:34,870
So let me collapse this collection and for post, let me add one request.

87
00:06:35,760 --> 00:06:38,130
And going to be as great.

88
00:06:44,010 --> 00:06:55,380
And let me copy the you are here and for post let me paste it here as that and change this one to post

89
00:06:55,380 --> 00:06:57,480
and going to be as post.

90
00:07:00,590 --> 00:07:01,400
There you go.

91
00:07:02,030 --> 00:07:05,120
And let me duplicate this one.

92
00:07:07,500 --> 00:07:10,260
All posts is get requests.

93
00:07:10,710 --> 00:07:11,760
It's sent.

94
00:07:11,940 --> 00:07:12,990
There you go.

95
00:07:13,380 --> 00:07:15,000
Let me collapse a little bit.

96
00:07:15,180 --> 00:07:16,590
Something like this.

97
00:07:16,590 --> 00:07:21,270
And this one going to be the details about the post.

98
00:07:22,530 --> 00:07:26,510
So here for a slash, some ID and there we go.

99
00:07:26,760 --> 00:07:28,710
The next is.

100
00:07:29,770 --> 00:07:32,980
Delete posts and difference.

101
00:07:32,980 --> 00:07:35,830
Here is a method delete, save.

102
00:07:35,830 --> 00:07:37,210
And there we go.

103
00:07:39,380 --> 00:07:41,510
Next is update.

104
00:07:44,830 --> 00:07:45,370
Difference.

105
00:07:45,370 --> 00:07:47,560
Here is a method put.

106
00:07:47,770 --> 00:07:49,450
And there you go.

107
00:07:50,050 --> 00:07:50,740
All right.

108
00:07:50,740 --> 00:07:52,480
That is it about the post.

109
00:07:52,480 --> 00:07:54,250
The next one going to be the comments.

110
00:07:54,250 --> 00:08:03,010
So our copy that you are and collapse all the opening tops and inside the comments.

111
00:08:03,520 --> 00:08:05,560
Let me add one request.

112
00:08:05,950 --> 00:08:06,670
Create.

113
00:08:07,480 --> 00:08:14,230
And pace that here is going to be comments and is post requests.

114
00:08:15,410 --> 00:08:16,060
All right.

115
00:08:16,070 --> 00:08:19,750
Next, a single comment.

116
00:08:19,760 --> 00:08:26,480
I'm going to be single and here for a slice, some ID and get.

117
00:08:27,210 --> 00:08:28,410
And there we go.

118
00:08:28,590 --> 00:08:30,870
The next is update.

119
00:08:35,770 --> 00:08:39,630
Difference here is the method and we have it.

120
00:08:39,640 --> 00:08:42,850
And lastly, it's about delete.

121
00:08:45,160 --> 00:08:49,750
And difference here is the method, and that is the delete.

122
00:08:49,780 --> 00:08:56,320
Now that we have all the endpoint work in the next video, let's go ahead and then refactor this code

123
00:08:56,320 --> 00:08:58,930
to use what is called express routing.

