Provide an unofficial TypeScript API Client for BunnyCDN with few dependencies.
- 🏗️ 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
Install via npm:
npm install bunny-client
fetch
API- Web Streams API
Supports Node.js 18+ and evergreen browsers
Get your API Key from your account settings
API Key example:
cb1a7c68-89a0-462a-9495-13ebd7366cfe
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,
});
bunny-client by John L. Armstrong IV is licensed under Attribution-NonCommercial-ShareAlike 4.0 International
Alternative licenses available by request.
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.