line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Azure::CognitiveServices::Face::Person; |
2
|
29
|
|
|
29
|
|
232
|
use strict; |
|
29
|
|
|
|
|
75
|
|
|
29
|
|
|
|
|
889
|
|
3
|
29
|
|
|
29
|
|
171
|
use warnings; |
|
29
|
|
|
|
|
67
|
|
|
29
|
|
|
|
|
770
|
|
4
|
29
|
|
|
29
|
|
153
|
use base 'Net::Azure::CognitiveServices::Face::Base'; |
|
29
|
|
|
|
|
64
|
|
|
29
|
|
|
|
|
25858
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
1
|
93
|
sub path {'/face/v1.0/persongroups'}; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _add_face_request { |
9
|
1
|
|
|
1
|
|
902
|
my ($self, $person_group_id, $person_id, $image_url, %param) = @_; |
10
|
1
|
|
|
|
|
14
|
$self->build_request(POST => ["$person_group_id/persons/$person_id/persistedFaces", %param], |
11
|
|
|
|
|
|
|
undef, {url => $image_url} |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub add_face { |
16
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, $person_id, $image_url, %param) = @_; |
17
|
0
|
|
|
|
|
0
|
my $req = $self->_add_face_request($person_group_id, $person_id, $image_url, %param); |
18
|
0
|
|
|
|
|
0
|
$self->request($req); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _create_request { |
22
|
1
|
|
|
1
|
|
876
|
my ($self, $person_group_id, %param) = @_; |
23
|
1
|
|
|
|
|
12
|
$self->build_request(POST => ["$person_group_id/persons"], undef, {%param}); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub create { |
27
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, %param) = @_; |
28
|
0
|
|
|
|
|
0
|
my $req = $self->_create_request($person_group_id, %param); |
29
|
0
|
|
|
|
|
0
|
$self->request($req); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _delete_request { |
33
|
1
|
|
|
1
|
|
1483
|
my ($self, $person_group_id, $person_id) = @_; |
34
|
1
|
|
|
|
|
10
|
$self->build_request(DELETE => ["$person_group_id/persons/$person_id"]); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub delete { |
38
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, $person_id) = @_; |
39
|
0
|
|
|
|
|
0
|
my $req = $self->_delete_request($person_group_id, $person_id); |
40
|
0
|
|
|
|
|
0
|
$self->request($req); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub _delete_face_request { |
44
|
1
|
|
|
1
|
|
903
|
my ($self, $person_group_id, $person_id, $persisted_face_id) = @_; |
45
|
1
|
|
|
|
|
11
|
$self->build_request(DELETE => ["$person_group_id/persons/$person_id/persistedFaces/$persisted_face_id"]); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub delete_face { |
49
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, $person_id, $persisted_face_id) = @_; |
50
|
0
|
|
|
|
|
0
|
my $req = $self->build_request($person_group_id, $person_id, $persisted_face_id); |
51
|
0
|
|
|
|
|
0
|
$self->request($req); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _get_request { |
55
|
1
|
|
|
1
|
|
837
|
my ($self, $person_group_id, $person_id) = @_; |
56
|
1
|
|
|
|
|
9
|
$self->build_request(GET => ["$person_group_id/persons/$person_id"]); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub get { |
60
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, $person_id) = @_; |
61
|
0
|
|
|
|
|
0
|
my $req = $self->_get_request($person_group_id, $person_id); |
62
|
0
|
|
|
|
|
0
|
$self->request($req); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub _get_face_request { |
66
|
1
|
|
|
1
|
|
1093
|
my ($self, $person_group_id, $person_id, $persisted_face_id) = @_; |
67
|
1
|
|
|
|
|
12
|
$self->build_request(GET => ["$person_group_id/persons/$person_id/persistedFaces/$persisted_face_id"]); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub get_face { |
71
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, $person_id, $persisted_face_id) = @_; |
72
|
0
|
|
|
|
|
0
|
my $req = $self->_get_face_request($person_group_id, $person_id, $persisted_face_id); |
73
|
0
|
|
|
|
|
0
|
$self->request($req); |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub _list_request { |
77
|
1
|
|
|
1
|
|
883
|
my ($self, $person_group_id) = @_; |
78
|
1
|
|
|
|
|
10
|
$self->build_request(GET => ["$person_group_id/persons"]); |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub list { |
82
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id) = @_; |
83
|
0
|
|
|
|
|
0
|
my $req = $self->_list_request($person_group_id); |
84
|
0
|
|
|
|
|
0
|
$self->request($req); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub _update_request { |
88
|
1
|
|
|
1
|
|
879
|
my ($self, $person_group_id, $person_id, %param) = @_; |
89
|
1
|
|
|
|
|
11
|
$self->build_request(PATCH => ["$person_group_id/persons/$person_id"], undef, {%param}); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub update { |
93
|
0
|
|
|
0
|
1
|
0
|
my ($self, $person_group_id, $person_id, %param) = @_; |
94
|
0
|
|
|
|
|
0
|
my $req = $self->_update_request($person_group_id, $person_id, %param); |
95
|
0
|
|
|
|
|
0
|
$self->request($req); |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub _update_face_request { |
99
|
1
|
|
|
1
|
|
845
|
my ($self, $person_group_id, $person_id, $persisted_face_id, %param) = @_; |
100
|
1
|
|
|
|
|
11
|
$self->build_request(PATCH => ["$person_group_id/persons/$person_id/persistedFaces/$persisted_face_id"], |
101
|
|
|
|
|
|
|
undef, |
102
|
|
|
|
|
|
|
{%param}, |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub update_face { |
107
|
0
|
|
|
0
|
1
|
|
my ($self, $person_group_id, $person_id, $persisted_face_id, %param) = @_; |
108
|
0
|
|
|
|
|
|
my $req = $self->_update_face_request($person_group_id, $person_id, $persisted_face_id, %param); |
109
|
0
|
|
|
|
|
|
$self->request($req); |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
1; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
__END__ |