NAME

Net::Azure::CognitiveServices::Face::Person - Person API class of Cognitive Services API

DESCRIPTION

Person API wrapper.

METHODS

add_face

Send "Add a Person Face" request.

$obj->add_face($person_group_id, $person_id, $image_url, 
    userData   => 'created_date:2016-08-01',
    targetFace => '10,10,100,100', 
);

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b for detail.

create

Send "Creaet a Person" request and fetch result as arrayref.

my $result = $obj->create($person_group_id,
    name     => "Donard Trump",
    userData => "created_date:2016-08-01",
);
say $result->{personId} ## output personId

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c for detail.

delete

Send "Delete a Person" request.

$obj->delete($person_group_id, $person_id);

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d for detail.

delete_face

Send "Delete a Person Face" request.

$obj->delete_face($person_group_id, $person_id, $persisted_face_id);

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e for detail.

get

Send "Get a Person" request and fetch result as hashref.

my $result = $obj->get($person_group_id, $person_id);
say $result->{personId}; ## output personId

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523f for detail.

get_face

Send "Get a Person Face" request and fetch result as hashref.

my $result = $obj->get_face($person_group_id, $person_id, $persisted_face_id);
say $result->{persistedFaceId}; ## output persistedFaceId

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395240 for detail.

list

Send "List Persons in a Person Group" request and fetch result as arrayref.

my $result = $obj->list($person_group_id);
say join("%s\n", map {$_->{personId}} @$result); ## output list of personId

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395241 for detail.

update

Send "Update a Person" request.

$obj->update($person_group_id, $person_id,
    name     => "Hillary Clinton",
    userData => "update:2016-08-01",
);

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395242 for detail.

update_face

Send "Update a Person Face" request.

$obj->update_face($person_group_id, $person_id, $persisted_face_id,
    userData => "update:2016-08-01",
);

Please see https://dev.projectoxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395243 for detail.

LICENSE

Copyright (C) ytnobody.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

ytnobody <ytnobody@gmail.com>