PHP code example of imn / api-php-client

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

    

imn / api-php-client example snippets


    


Instance = new IMN\Swagger\Client\Api\MerchantAPIListOfValuesLOVApi(
    // 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()
);
$list_name = "list_name_example"; // string | The list of value name your want to get
$accept_language = array("accept_language_example"); // string[] | Indicates that the client accepts the following languages.
$if_none_match = "if_none_match_example"; // string | ETag value to identify the last known version of requested resource.\\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3

try {
    $result = $apiInstance->getUserListOfValues($list_name, $accept_language, $if_none_match);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MerchantAPIListOfValuesLOVApi->getUserListOfValues: ', $e->getMessage(), PHP_EOL;
}