Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bunny-client

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunny-client

TypeScript API Client for BunnyCDN 🐰

  • 0.0.22
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

bunny-client The TypeScript API Client for BunnyCDN 🐰

[!IMPORTANT]
Please use bunny-sdk-typescript instead. This repository is now in maintenance mode.

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
  • ✅ Edge Storage API
    • ✅ Manage Files
      • ✅ Download File
      • ✅ Upload File
      • ✅ Delete File
    • ✅ Browse Files
      • ✅ List 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

  1. Import the client
  2. Optionally set globals, like the apiKey
  3. 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 guides
  • tsdoc examples for all inputs and outputs
  • Replace the generic AccessKey with apiKey and storageZonePassword
  • More default parameters
const storageZoneClient = createStorageZoneClient({
  apiKey: API_ACCESS_KEY,
});

const response = await storageZoneClient("addStorageZone", {
  Name: "api-example",
  Region: "NY",
  ZoneTier: 1,
});

License

bunny-client by John L. Armstrong IV is licensed under Attribution-NonCommercial-ShareAlike 4.0 International

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.

Keywords

FAQs

Package last updated on 08 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc