Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,560 --> 00:00:07,030
OK, guys, welcome to the course of Lavallade EPDP editorial, this is our partner, 14.
2
00:00:07,400 --> 00:00:13,500
Inside this video, we are going to create an API which will display the information of single data.
3
00:00:14,090 --> 00:00:22,910
So if I go back to Ed, in the last video, we had completed all about our API as well as a list employs
4
00:00:22,910 --> 00:00:23,680
API.
5
00:00:24,350 --> 00:00:31,670
Now, inside this video, viewed over work over a single detail API in which we will pass employee ID
6
00:00:32,000 --> 00:00:37,920
by the help of that employee, it will fetch only specific employee information.
7
00:00:38,690 --> 00:00:44,710
So what I will do as we know that we have loaded employee model inside last video.
8
00:00:45,020 --> 00:00:51,530
So first of all, on the behalf of this employee ID, we need to check that this employee accessed or
9
00:00:51,530 --> 00:00:52,040
not.
10
00:00:53,000 --> 00:00:59,210
If we do exist, then we need to return the response once the details of that employee otherwise employee
11
00:00:59,210 --> 00:00:59,990
not found.
12
00:01:00,410 --> 00:01:02,780
So simply what I will do it.
13
00:01:02,840 --> 00:01:14,450
If employee model will put their condition, we will check that the ID that we have passed is equal
14
00:01:14,450 --> 00:01:15,410
to it.
15
00:01:15,410 --> 00:01:19,940
Column of DBL and we will use the existing method.
16
00:01:21,380 --> 00:01:25,100
If the employee accessed that, it will return true value.
17
00:01:25,320 --> 00:01:30,400
Otherwise employee not accessed Edmans false value.
18
00:01:30,770 --> 00:01:45,830
So what I will do return its response will use Dewson early and inside that Litsa status equals to zero
19
00:01:47,210 --> 00:01:48,170
message.
20
00:01:49,400 --> 00:01:50,780
It's the employee.
21
00:01:53,790 --> 00:02:01,680
Let's make the first litterers capital, so employee not found and we will return the status quo.
22
00:02:01,740 --> 00:02:04,620
Let's say for zero for now.
23
00:02:04,620 --> 00:02:06,930
Inside this block, it means to employ excessed.
24
00:02:07,260 --> 00:02:18,840
So what I will do for you to stay employed details solice employed detail equals to employ model we
25
00:02:19,090 --> 00:02:22,150
will use will matter to check our condition.
26
00:02:22,620 --> 00:02:31,290
This is the idea value and we will use the first method after that simply let's return response.
27
00:02:32,520 --> 00:02:39,630
Jaeson putting in any Litsa that status equals Tufan
28
00:02:41,880 --> 00:02:46,170
message lets the employee found.
29
00:02:50,390 --> 00:02:57,770
And finally, we'll add one more parameter, that is data and anxieties, will this employed detail.
30
00:02:59,510 --> 00:03:08,510
Now, if you save all these changes back to man, if I copy this, you all go here back to EPA, dot,
31
00:03:08,530 --> 00:03:09,200
BSP.
32
00:03:09,590 --> 00:03:12,470
So we're using single employments.
33
00:03:12,470 --> 00:03:15,010
We're calling it single employee matter.
34
00:03:15,530 --> 00:03:21,560
So we need to copy this route back to Postman instead of listing employees.
35
00:03:21,980 --> 00:03:27,020
This time we have a single highway employee and the Matadi.
36
00:03:27,030 --> 00:03:32,600
We need to use a get request type and we need to pass employee ID into the wall.
37
00:03:33,200 --> 00:03:34,450
So back to Postman.
38
00:03:35,030 --> 00:03:38,630
So here we have the post I equals to get request type.
39
00:03:39,290 --> 00:03:45,490
And if we pass two, as you can see that inside is two, we have this employee.
40
00:03:46,010 --> 00:03:53,540
So when we pass inside the single employee out to click on send button, as you can see that we are
41
00:03:53,540 --> 00:03:56,660
getting all about second employee detail.
42
00:03:57,170 --> 00:04:03,800
But when we make two to 20, it means that this employee ID does not exist into our list.
43
00:04:04,430 --> 00:04:11,600
So in that case, if we press send button, as you can see, that employee not found and he'll look
44
00:04:11,600 --> 00:04:18,800
at the status code for 04, we are getting also we can control our status code.
45
00:04:18,990 --> 00:04:26,330
What we had written here so successfully, guys, this is the video is only to get a single employee
46
00:04:26,330 --> 00:04:26,930
detail.
47
00:04:27,320 --> 00:04:31,360
Now, in the next video, we will discuss over update API.
48
00:04:31,760 --> 00:04:32,900
So far this decision.
49
00:04:32,900 --> 00:04:35,210
Guys, thank you for watching and have a great day.
4848
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.