Important
Please use bunny-sdk-typescript
instead. This repository is now in maintenance mode.
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.