1
00:00:05,630 --> 00:00:06,890
In this video.

2
00:00:06,890 --> 00:00:13,100
Let's go ahead to test our endpoint using the tender client extension.

3
00:00:13,100 --> 00:00:18,140
So for this, we are going to create collection for a specific endpoint.

4
00:00:18,140 --> 00:00:22,820
So to do that, click on this icon and click on collection.

5
00:00:22,820 --> 00:00:25,760
The first one I'm going to be using this collection

6
00:00:32,330 --> 00:00:34,400
account collection.

7
00:00:34,490 --> 00:00:36,260
So let's start with the user.

8
00:00:36,260 --> 00:00:39,590
So let's click this one to add new requests.

9
00:00:39,800 --> 00:00:49,670
And the first one I'm going to be as register and then the user is going to be as a t t p colon for

10
00:00:49,670 --> 00:01:02,630
slash voice slash look host colon 9004 slash API for slash version one for slash users and for slash

11
00:01:02,630 --> 00:01:03,470
register.

12
00:01:04,190 --> 00:01:08,810
And then the method is going to be as post requests.

13
00:01:08,810 --> 00:01:11,540
So let's save it and let's hit send.

14
00:01:11,600 --> 00:01:14,240
You can see that we have four four.

15
00:01:14,240 --> 00:01:17,810
So what happen even though we have the root here?

16
00:01:17,810 --> 00:01:19,340
So what is the problem?

17
00:01:19,370 --> 00:01:25,760
The problem is that any time we make changes to our code, we need to restart our server and we are

18
00:01:25,770 --> 00:01:29,810
going to install Node one in just a second to avoid this.

19
00:01:29,810 --> 00:01:37,730
So when I send the request again, you can see I have the registered root, so let's install the Node

20
00:01:37,730 --> 00:01:38,750
one package

21
00:01:45,530 --> 00:01:49,430
and for this we are going to install it as the dependency.

22
00:01:49,430 --> 00:01:50,810
So our hit enter.

23
00:01:50,840 --> 00:01:59,870
So let's configure the package or casing file to use normal and let's add our scripts server and then

24
00:01:59,870 --> 00:02:00,860
colon.

25
00:02:01,040 --> 00:02:10,430
I'm going to use Node Mom, Colon Node Mom and then the name of the file which is server dot G's.

26
00:02:10,610 --> 00:02:14,780
So this time around I'm going to use the server script here

27
00:02:18,050 --> 00:02:19,880
and it is using Node Mom.

28
00:02:19,910 --> 00:02:20,330
Great.

29
00:02:20,330 --> 00:02:23,180
So let's continue to implement the testing.

30
00:02:23,330 --> 00:02:28,850
So let's collapse this one and let's go back to the ten dot line extension.

31
00:02:28,850 --> 00:02:30,800
So for this, let's show you save it.

32
00:02:30,800 --> 00:02:32,660
So let's copy this one.

33
00:02:32,660 --> 00:02:42,110
We can duplicate that one, click here and then duplicate and change this one too as logged in and here

34
00:02:42,140 --> 00:02:45,870
let's change the last endpoint to look in.

35
00:02:45,920 --> 00:02:48,500
Let's hit enter and it's working.

36
00:02:48,620 --> 00:02:51,860
The next one, I'm going to be the whole file.

37
00:02:51,860 --> 00:02:56,390
So here, let's change this one to Pro File also.

38
00:02:56,480 --> 00:03:04,670
And this time around we're going to be get requests and forward slash profile for slash some ID, hit

39
00:03:04,670 --> 00:03:05,330
enter.

40
00:03:05,330 --> 00:03:08,390
And you can see that there is no route for this.

41
00:03:08,390 --> 00:03:12,440
So let's check our server file to make sure that it exists.

42
00:03:12,440 --> 00:03:17,720
Oh, sorry, guys, I forgot to add the colon here, so save it.

43
00:03:17,720 --> 00:03:19,700
And now let's send again.

44
00:03:19,700 --> 00:03:20,330
Wow.

45
00:03:20,330 --> 00:03:21,800
I still have an error.

46
00:03:21,800 --> 00:03:23,720
So what is the problem?

47
00:03:24,050 --> 00:03:24,650
Oh, sorry.

48
00:03:24,650 --> 00:03:25,430
Again, this.

49
00:03:25,430 --> 00:03:27,950
I'm going to be as get replace.

50
00:03:27,950 --> 00:03:29,030
Sorry, guys.

51
00:03:29,030 --> 00:03:33,500
So let's hit send and now this is my file endpoint.

52
00:03:33,740 --> 00:03:37,580
Then this one going to be the delete and then the updates.

53
00:03:37,580 --> 00:03:39,680
So back to the client.

54
00:03:39,680 --> 00:03:43,580
So let's duplicate this one as delete.

55
00:03:43,610 --> 00:03:48,200
Let's rename this one and change to the leads.

56
00:03:48,950 --> 00:03:56,900
And for this we need to add the HTTP method and for delete you don't need the profile, but instead

57
00:03:56,900 --> 00:04:02,180
we need to have some random ID and let's hit send and this is a delete.

58
00:04:02,240 --> 00:04:06,080
The next one is going to be updated.

59
00:04:06,260 --> 00:04:11,300
So let's rename this one to update

60
00:04:13,460 --> 00:04:14,360
rename.

61
00:04:18,450 --> 00:04:19,579
An update.

62
00:04:19,700 --> 00:04:21,470
And here we go.

63
00:04:21,500 --> 00:04:30,110
Let's save it and let's change this one to put requests and let's hit send where as we get some error,

64
00:04:30,260 --> 00:04:33,500
let's check again my server file for updates.

65
00:04:33,800 --> 00:04:36,760
So let's go down this End Point.

66
00:04:36,770 --> 00:04:37,700
Oh, sorry, guys.

67
00:04:37,700 --> 00:04:41,900
I forgot to bring the column here back on my side.

68
00:04:42,140 --> 00:04:45,950
So here, let's remove the profile here.

69
00:04:45,950 --> 00:04:49,010
Sorry, guys, and let's hit send.

70
00:04:49,010 --> 00:04:51,710
And now I have the update.

71
00:04:51,740 --> 00:04:55,830
Now all the endpoint for the user is complete.

72
00:04:55,850 --> 00:05:03,320
The next one is let's work on the transaction, so let's collapse this one and now let's get back to

73
00:05:03,320 --> 00:05:04,280
transaction.

74
00:05:04,280 --> 00:05:12,800
So let's add our first requests and it's going to be as create transaction and then let's copy the you

75
00:05:12,800 --> 00:05:23,810
are here and inside the transaction, let's pass eight and change the API version one to transactions

76
00:05:24,200 --> 00:05:29,540
and then the method going to be post method and there we go.

77
00:05:29,780 --> 00:05:38,120
So let's go ahead to duplicate this one and let's change this one to delete.

78
00:05:41,140 --> 00:05:48,530
So here you're going to be delete and you pass in some ID and let's hit send.

79
00:05:48,550 --> 00:05:49,930
This is delete.

80
00:05:50,170 --> 00:05:55,090
The next one is going to be fetch single transaction.

81
00:05:55,270 --> 00:06:00,980
So let's rename this one to single single.

82
00:06:01,150 --> 00:06:06,940
So here is going to be get requests and let's get send and get transaction.

83
00:06:07,300 --> 00:06:11,380
The next one is going to be as.

84
00:06:12,960 --> 00:06:13,810
Updates.

85
00:06:14,010 --> 00:06:18,060
Let's change the method to hoots and let's get sane.

86
00:06:18,240 --> 00:06:20,220
So after this, let's see.

87
00:06:20,220 --> 00:06:23,480
We have post leads, single update.

88
00:06:23,490 --> 00:06:24,920
I think that's what we need.

89
00:06:24,930 --> 00:06:28,140
Or we can add getting all transactions.

90
00:06:28,140 --> 00:06:40,950
So here is going to be as or and then change this one to get and let's remove the ID and get transactions.

91
00:06:41,100 --> 00:06:46,040
So now our transaction testing endpoint is complete.

92
00:06:46,050 --> 00:06:51,690
Then this one going to be the account creation is going to be the same process.

93
00:06:51,690 --> 00:06:59,910
So our first request is going to be as create also and then the you are or the endpoint is going to

94
00:06:59,910 --> 00:07:02,520
be account.

95
00:07:02,760 --> 00:07:08,220
And here is post HTTP method, it's signed and there we go.

96
00:07:08,310 --> 00:07:16,790
And after creating we also need or we also want to fetch all accounts.

97
00:07:16,800 --> 00:07:25,210
So here change this one to get save it and there is no endpoint for fetching or account.

98
00:07:25,230 --> 00:07:28,650
So we can go ahead and add that one quickly.

99
00:07:28,650 --> 00:07:31,170
So back to the server file.

100
00:07:32,070 --> 00:07:39,390
Let's see where we have the account, this account root and let's scroll down and let's copy one of

101
00:07:39,390 --> 00:07:42,720
this ones and paste here.

102
00:07:42,740 --> 00:07:44,670
We're going to be as gets.

103
00:07:45,580 --> 00:07:53,770
And here as account and here as account and here as gets.

104
00:07:54,160 --> 00:07:59,350
And let's change this one to get account.

105
00:07:59,350 --> 00:08:00,250
Save it.

106
00:08:00,250 --> 00:08:03,700
And now let's get to all four account.

107
00:08:03,940 --> 00:08:09,130
So this one so let's hit saying and I have the get account rule.

108
00:08:09,130 --> 00:08:17,650
So let me close all these open tabs and now let's continue on after getting all we also want, let me

109
00:08:17,660 --> 00:08:19,070
collect this one again.

110
00:08:19,270 --> 00:08:24,660
I also want to find a single account if we want.

111
00:08:24,670 --> 00:08:28,960
So here is going to be a single account.

112
00:08:29,080 --> 00:08:33,929
So here we add some random ID here to match that endpoint.

113
00:08:34,090 --> 00:08:36,880
Again, the is the end point for that.

114
00:08:36,880 --> 00:08:41,350
So let's go ahead and also add that one quickly here.

115
00:08:41,409 --> 00:08:50,850
So here, let's see, we have this ones and there is no where we have it and supposed to be gets.

116
00:08:50,860 --> 00:08:51,970
Sorry guys.

117
00:08:51,970 --> 00:08:56,590
So here let's click on sign and there we have it.

118
00:08:56,830 --> 00:09:03,820
So after this one, what we need to create when I read the delete and then the update.

119
00:09:04,030 --> 00:09:15,820
So here is going to be as delete and here change the method to delete, save it and let's hit st and

120
00:09:15,820 --> 00:09:18,340
then we go after deleting.

121
00:09:18,340 --> 00:09:21,910
We also need to add the updates.

122
00:09:21,910 --> 00:09:35,170
So here let's rename this one to update and change the method to put requests and here we go.

123
00:09:35,170 --> 00:09:41,380
So in the next video, let's go ahead and then refactor this one to use MVC design pattern.

124
00:09:41,410 --> 00:09:41,860
All right.

125
00:09:41,860 --> 00:09:43,870
So let's get rocking in the next video.

