PHP code example of handsondigital / lib.php.idplugger
1. Go to this page and download the library: Download handsondigital/lib.php.idplugger 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/ */
handsondigital / lib.php.idplugger example snippets
Configure Bearer (JWT) authorization: bearerAuth
$config = IdpluggerPromotion\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new IdpluggerPromotion\Api\ArticlesApi(
// 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
);
$promotion_id = 'promotion_id_example'; // string | ID da promoção
$article = array(new \IdpluggerPromotion\Model\Article()); // \IdpluggerPromotion\Model\Article[]
try {
$result = $apiInstance->articlesCreate($promotion_id, $article);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ArticlesApi->articlesCreate: ', $e->getMessage(), PHP_EOL;
}