1. Go to this page and download the library: Download vgrish/yclients-openapi-php 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/ */
vgrish / yclients-openapi-php example snippets
apiInstance = new Vgrish\YclientsOpenApi\Api\DefaultApi(
// 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()
);
$accept = application/vnd.yclients.v2+json; // string | e.g. application/vnd.yclients.v2+json
$content_type = 'content_type_example'; // string | application/json
$authorization = Bearer {{partner_token}}; // string | Bearer partner_token
$auth_user_request = {"login":"{{login}}","password":"{{password}}"}; // \Vgrish\YclientsOpenApi\Model\AuthUserRequest
try {
$result = $apiInstance->authUser($accept, $content_type, $authorization, $auth_user_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->authUser: ', $e->getMessage(), PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.