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