line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Azure::CognitiveServices::Face::FaceList; |
2
|
29
|
|
|
29
|
|
211
|
use strict; |
|
29
|
|
|
|
|
66
|
|
|
29
|
|
|
|
|
945
|
|
3
|
29
|
|
|
29
|
|
174
|
use warnings; |
|
29
|
|
|
|
|
83
|
|
|
29
|
|
|
|
|
905
|
|
4
|
29
|
|
|
29
|
|
205
|
use base 'Net::Azure::CognitiveServices::Face::Base'; |
|
29
|
|
|
|
|
91
|
|
|
29
|
|
|
|
|
21023
|
|
5
|
|
|
|
|
|
|
|
6
|
7
|
|
|
7
|
1
|
63
|
sub path {'/face/v1.0/facelists'}; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _create_request { |
9
|
1
|
|
|
1
|
|
921
|
my ($self, $face_list_id, %param) = @_; |
10
|
|
|
|
|
|
|
my $body = { |
11
|
|
|
|
|
|
|
name => $param{name} || "$face_list_id", |
12
|
1
|
|
33
|
|
|
10
|
userData => $param{userData} || "$face_list_id", |
|
|
|
33
|
|
|
|
|
13
|
|
|
|
|
|
|
}; |
14
|
1
|
|
|
|
|
8
|
$self->build_request(PUT => [$face_list_id], undef, $body); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub create { |
18
|
0
|
|
|
0
|
1
|
0
|
my ($self, $face_list_id, %param) = @_; |
19
|
0
|
|
|
|
|
0
|
my $req = $self->_create_request($face_list_id, %param); |
20
|
0
|
|
|
|
|
0
|
$self->request($req); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _add_request { |
24
|
1
|
|
|
1
|
|
1087
|
my ($self, $face_list_id, $image_url, %param) = @_; |
25
|
1
|
|
|
|
|
12
|
$self->build_request(POST => ["$face_list_id/persistedFaces", %param], undef, {url => $image_url}); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub add { |
29
|
0
|
|
|
0
|
1
|
0
|
my ($self, $face_list_id, $image_url, %param) = @_; |
30
|
0
|
|
|
|
|
0
|
my $req = $self->_add_request($face_list_id, $image_url, %param); |
31
|
0
|
|
|
|
|
0
|
$self->request($req); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _delete_request { |
35
|
1
|
|
|
1
|
|
865
|
my ($self, $face_list_id, $remove_face_id) = @_; |
36
|
1
|
|
|
|
|
10
|
$self->build_request(DELETE => ["$face_list_id/persistedFaces/$remove_face_id"]); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub delete { |
40
|
0
|
|
|
0
|
1
|
0
|
my ($self, $face_list_id, $remove_face_id) = @_; |
41
|
0
|
|
|
|
|
0
|
my $req = $self->_delete_request($face_list_id, $remove_face_id); |
42
|
0
|
|
|
|
|
0
|
$self->request($req); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _flush_request { |
46
|
1
|
|
|
1
|
|
859
|
my ($self, $face_list_id) = @_; |
47
|
1
|
|
|
|
|
8
|
$self->build_request(DELETE => ["$face_list_id"]); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub flush { |
51
|
0
|
|
|
0
|
1
|
0
|
my ($self, $face_list_id) = @_; |
52
|
0
|
|
|
|
|
0
|
my $req = $self->_flush_request($face_list_id); |
53
|
0
|
|
|
|
|
0
|
$self->request($req); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub _get_request { |
57
|
1
|
|
|
1
|
|
1445
|
my ($self, $face_list_id) = @_; |
58
|
1
|
|
|
|
|
10
|
$self->build_request(GET => ["$face_list_id"]); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub get { |
62
|
0
|
|
|
0
|
1
|
0
|
my ($self, $face_list_id) = @_; |
63
|
0
|
|
|
|
|
0
|
my $req = $self->_get_request($face_list_id); |
64
|
0
|
|
|
|
|
0
|
$self->request($req); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub _list_request { |
68
|
1
|
|
|
1
|
|
886
|
my ($self) = @_; |
69
|
1
|
|
|
|
|
7
|
$self->build_request('GET'); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub list { |
73
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
74
|
0
|
|
|
|
|
0
|
my $req = $self->_list_request; |
75
|
0
|
|
|
|
|
0
|
$self->request($req); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub _update_request { |
79
|
1
|
|
|
1
|
|
868
|
my ($self, $face_list_id, %param) = @_; |
80
|
1
|
|
|
|
|
11
|
$self->build_request(PATCH => ["$face_list_id"], undef, {%param}); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub update { |
84
|
0
|
|
|
0
|
1
|
|
my ($self, $face_list_id, %param) = @_; |
85
|
0
|
|
|
|
|
|
my $req = $self->_update_request($face_list_id); |
86
|
0
|
|
|
|
|
|
$self->request($req); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__END__ |