PHP code example of coolseven / huawei-frs-sdk
1. Go to this page and download the library: Download coolseven/huawei-frs-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coolseven / huawei-frs-sdk example snippets
// $endpoint , $ak,$sk can be found at Huawei's console panel
$authInfo = new AuthInfo($endpoint,$ak,$sk);
$frsClient = new FrsClient($authInfo,$projectId);
// get face set list
// v1 版本:
$responseOfV1 = $frsClient
->getFaceSetService()
->getAllFaceSets();
// v2 版本:
$responseOfV2 = $frsClient->getApiCollectionV2()
->getFaceSetService()
->getAllFaceSets();