pachico / belugacdn
This package is abandoned and no longer maintained.
No replacement package was suggested.
Light client for BelugaCDN API
0.1.0
2017-04-20 06:54 UTC
Requires
- php: ~5.6|~7.0
- php-curl-class/php-curl-class: ^7.2
Requires (Dev)
- phpunit/phpunit: ~5.0||~6.0
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2022-01-21 22:23:42 UTC
README
Simple library to interact with BelugaCDN API. Current version only includes cache invalidation functionality.
Install
Via Composer
$ composer require pachico/belugacdn
Usage
With token authorization
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(); }
With username and password
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(); }
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email pachicodev@gmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.