0.0.19 • Published 3 days ago
bunny-client v0.0.19
bunny-client
The TypeScript API Client for BunnyCDN 🐰
Motivation
Provide an unofficial TypeScript API Client for BunnyCDN with few dependencies.
Documentation
Supported APIs
- 🏗️ API
- ✅ Countries
- ✅ Get Country List
- ✅ Support
- ✅ Get Ticket List
- ✅ Get Ticket Details
- ✅ Close Ticket
- ✅ Reply Ticket
- ✅ Create Ticket
- ✅ Region
- ✅ Region List
- 🏗️ Stream Video Library
- 🏗️ DNS Zone
- 🏗️ Pull Zone
- 🏗️ List Pull Zones
- 🏗️ Add Pull Zone
- 🏗️ Get Pull Zone
- 🏗️ Update Pull Zone
- 🏗️ Delete Pull Zone
- 🏗️ Delete Edge Rule
- 🏗️ Add/Update Edge Rule
- 🏗️ Set Edge Rule Enabled
- 🏗️ Get Origin Shield Queue Statistics
- 🏗️ Get SafeHop Statistics
- 🏗️ Get Optimizer Statistics
- 🏗️ Load Free Certificate
- 🏗️ Purge Cache
- 🏗️ Check the pull zone availability
- 🏗️ Add Custom Certificate
- 🏗️ Remove Certificate
- 🏗️ Add Custom Hostname
- 🏗️ Remove Custom Hostname
- 🏗️ Set Force SSL
- 🏗️ Reset token Key
- 🏗️ Add Allowed Referer
- 🏗️ Remove Allowed Referer
- 🏗️ Add Blocked Referer
- 🏗️ Remove Blocked Referer
- 🏗️ Add Blocked IP
- 🏗️ Remove Blocked IP
- 🏗️ Purge
- ✅ Statistics
- ✅ Get Statistics
- ✅ Storage Zone
- ✅ List Storage Zones
- ✅ Add Storage Zone
- ✅ Check the Storage Zone Availability
- ✅ Get Storage Zone
- ✅ Update Storage Zone
- ✅ Delete Storage Zone
- ✅ Get Storage Zone Statistics
- ✅ Reset Password
- ✅ Reset Read-Only Password
- ✅ Countries
- ✅ Edge Storage API
- ✅ Manage Files
- ✅ Download File
- ✅ Upload File
- ✅ Delete File
- ✅ Browse Files
- ✅ List Files
- ✅ Manage Files
- 🏗️ Stream API
- 🏗️ TUS
- 🏗️ Manage Collections
- 🏗️ Manage Videos
Quick start
Installation
Install via npm:
npm install bunny-client
Required polyfills
fetch
API- Web Streams API
Supports Node.js 18+ and evergreen browsers
Account Access Key
Get your API Key from your account settings
API Key example:
cb1a7c68-89a0-462a-9495-13ebd7366cfe
Client
Each client matches with a menu item in the Bunny CDN docs
- Import the client
- Optionally set globals, like the
apiKey
- Use the client methods to call the API
The main differences between the API and the TypeScript Client are:
camelCase
inputs and outputs to match TypeScript style guidestsdoc
examples for all inputs and outputs- Replace the generic
AccessKey
withapiKey
andstorageZonePassword
- More default parameters
const storageZoneClient = createStorageZoneClient({
apiKey: API_ACCESS_KEY,
});
const response = await storageZoneClient("addStorageZone", {
Name: "api-example",
Region: "NY",
ZoneTier: 1,
});
License
Alternative licenses available by request.
Contributing
PRs welcome! All contributors must sign the CLA Agreement so that the project license can be changed to MIT when sponsored. Thank you for your contributions.
0.0.19
3 days ago
0.0.18
2 months ago
0.0.17
3 months ago
0.0.11
10 months ago
0.0.12
10 months ago
0.0.13
9 months ago
0.0.14
9 months ago
0.0.15
9 months ago
0.0.16
6 months ago
0.0.9
11 months ago
0.0.8
11 months ago
0.0.7
11 months ago
0.0.6
11 months ago
0.0.5
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago