PHP code example of asmprotocol / php-client

1. Go to this page and download the library: Download asmprotocol/php-client 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/ */

    

asmprotocol / php-client example snippets


    


onfigure API key authorization: asmp_auth
$config = ASMP\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ASMP\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new ASMP\Client\Api\ChangeApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \ASMP\Client\Model\ChangeRequest(); // \ASMP\Client\Model\ChangeRequest | Request a specific change

try {
    $result = $apiInstance->change($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChangeApi->change: ', $e->getMessage(), PHP_EOL;
}