PHP code example of google / cloud-financialservices
1. Go to this page and download the library: Download google/cloud-financialservices 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/ */
google / cloud-financialservices example snippets
Google\ApiCore\ApiException;
Google\Cloud\FinancialServices\V1\BacktestResult;
Google\Cloud\FinancialServices\V1\Client\AMLClient;
Google\Cloud\FinancialServices\V1\GetBacktestResultRequest;
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetBacktestResultRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var BacktestResult $response */
$response = $aMLClient->getBacktestResult($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}