npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bunny-api

v0.1.6

Published

A simple API for Bunny.net

Downloads

5

Readme

Bunny.net api :rabbit:

A simple api for bunny.net services.

Included Features :white_check_mark:

STREAM API

  • TUS Resumable Uploads

Manage Collections

  • Get Collection
  • Update Collection
  • Delete Collection
  • Get Collection List
  • Create Collection

Manage Videos

  • Get Video
  • List Videos
  • Create Video
  • Delete Video

Planned Features :construction:

BUNNY.NET API

Countries

  • Get Country List

API Keys

  • List API Keys

Region

  • Region list

Stream Video Library

  • List Video Libraries
  • Add Video Library
  • Get Video Library
  • Update Video Library
  • Delete Video Library
  • Get Languages
  • Reset Password
  • Reset Password
  • Add Watermark
  • Delete Watermark
  • Add Allowed Referer
  • Remove Allowed Referer
  • Add Blocked Referer
  • Remove Blocked Referer

DNS Zone

  • List DNS Zones
  • Add DNS Zone
  • Get DNS Zone
  • Update DNS Zones
  • Delete DNS Zone
  • Export DNS Zone
  • Get DNS Query Statistics
  • Check the DNS zone availability
  • Add DNS Record
  • Update DNS Record
  • Delete DNS Record
  • Import DNS Records

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 Qeue 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

  • Purge URL
  • Purge URL

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

Manage Videos

  • Upload Video
  • Update Video
  • Get Video Heatmap
  • Get Video play data
  • Get Video Statistics
  • Reencode Video
  • Repackage Video
  • Set Thumbnail
  • Fetch Video
  • Add Caption
  • Delete Caption
  • Transcribe video

OEmbed

  • OEmbed

Usage

Stream API

Usage Example

Include in the project

import { StreamAPI } from 'bunny-api';

Create a StreamAPI object

const streamAPI = new StreamAPI(ACCESS_KEY, LIBRARY_ID);

Example code: creating a collection

const response = await streamAPI.createCollection({
  name: 'Test Collection',
});

Methods

Tus Resumable Uploads

| Method | Description | Parameters | Response | | ----------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | tusUpload() | Uploads video file via tus | videoGuid: string, file: fs.ReadStream or Blob, onProgress(bytesSent: number, bytesTotal: number), onSucces: (), onError: (error: Error) | Promise: void |

Manage Collections

| Method | Description | Parameters | Response | | ------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | getCollection() | Recives a collection data | guid: string, includeThumbnails: boolean = false | Promise:IAPIResponse:ICollectionData | | updateCollection() | Updates a collection data | guid: string, bodyParams: IUpdateCollectionModel | Promise:IAPIResponse:ICollectionData | | deleteCollection() | Deletes a collection | guid: string | Promise:IAPIResponse  | | getCollectionList() | Recives multiple collections and data | page: number or null = null, itemsPerPage: number or null = null, search: string or null = null, orderBy: string or null = null, includeThumbnails: boolean or null = null | Promise:IAPIResponse:IListResponse:ICollectionData | | createCollection() | Creates a collection | bodyParams: IUpdateCollectionModel | Promise:IAPIResponse:ICollectionData |

Manage Videos

| Method | Description | Parameters | Response | | ------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- | | getVideo | Recives a video data | bodyParams: ICreateVideoModel | Promise:IAPIResponse:IVideoData | | listVideos() | Recives multiple videos and data | page: number or null = null, itemsPerPage: number or null = null, search: string or null = null, collection: string or null = null, orderBy: string or null = null | Promise:IAPIResponse:IListResponse:IVideoData | | createVideo() | Creates a video | bodyParams: ICreateVideoModel | Promise:IAPIResponse:IVideoData | | deleteVideo() | Deletes a video | guid: string | Promise:IAPIResponse |