1. Go to this page and download the library: Download astelbe/sdk-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/ */
astelbe / sdk-php example snippets
// All methods 'vendor/autoload.php';
use AstelSDK\Model\Partner;
use AstelSDK\Model\Brand;
$envParticle = ''; // '' for production, 'sta' for staging env
$apiToken = '12345abcde'; // API Private Token provided by Astel
$isDebug = false; // For more debug info
$logPath = null; // Null for no logs, a valid writable path for file logs
$isPrivate = true; // Default private / professionnal param (Optionnal)
$language = 'FR'; // Default language used by the page (Optionnal)
$AstelApiContext = new AstelSDK\AstelContext($envParticle, $apiToken, $isDebug, $logPath);
$AstelApiContext->setIsPrivate($isPrivate);
$AstelApiContext->setLanguage($language);
// Utils debug function registering
AstelSDK\AstelContext::registerUtilsFunctions();