PHP code example of bploeger / picthrive

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

    

bploeger / picthrive example snippets



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

$apiInstance = new OpenAPI\Client\Api\BrandApi(
    // 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
);
$brand_id = 'brand_id_example'; // string | The unique ID of the Brand

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