Simple library to interact with BelugaCDN API. Current version only includes cache invalidation functionality.
Via Composer
$ composer require pachico/belugacdn
use Pachico\BelugaCDN;
try {
$auth = new BelugaCDN\Auth\Token('mytoken');
$client = new BelugaCDN\CacheInvalidation($auth);
$response = $client->invalidateCache([
'http://cdn.mysite.com/picture.jpg',
'http://cdn.mysite.com/html.html'
]);
print_r($response);
} catch (\Exception $exc) {
echo $exc->getMessage();
}
use Pachico\BelugaCDN;
try {
$auth = new BelugaCDN\Auth\Credential('username', 'password');
$client = new BelugaCDN\CacheInvalidation($auth);
$response = $client->invalidateCache([
'http://cdn.mysite.com/picture.jpg',
'http://cdn.mysite.com/html.html'
]);
print_r($response);
} catch (\Exception $exc) {
echo $exc->getMessage();
}
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email pachicodev@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.