Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/incapption-public/bunnypurge
BunnyCDN cache purging
https://github.com/incapption-public/bunnypurge
composer
Last synced: about 2 months ago
JSON representation
BunnyCDN cache purging
- Host: GitHub
- URL: https://github.com/incapption-public/bunnypurge
- Owner: incapption-public
- Created: 2021-03-04T13:26:55.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-04T16:35:29.000Z (almost 4 years ago)
- Last Synced: 2024-11-10T09:40:51.969Z (2 months ago)
- Topics: composer
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BunnyPurge
Tiny package for purging files on BunnyCN (https://bunny.net) using Guzzle HTTP client.## Usage
```php
$client = new BunnyPurge('YOUR_BUNNY_API_KEY');
$client->purge('https://example.b-cdn.net/example.jpg');
````$client->purge()` throws `BunnyException` on non 200 status codes and `GuzzleException` on request exceptions.
## Tests
Create a `phpunit.xml` in the project directory and add PHP variables for your API Key and a test URL pointing to a file on your CDN.
```xml
src/
tests
```