0.1.6 • Published 12 months ago

bunny-api v0.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

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
MethodDescriptionParametersResponse
tusUpload()Uploads video file via tusvideoGuid: string, file: fs.ReadStream or Blob, onProgress(bytesSent: number, bytesTotal: number), onSucces: (), onError: (error: Error)Promise: void

Manage Collections

MethodDescriptionParametersResponse
getCollection()Recives a collection dataguid: string, includeThumbnails: boolean = falsePromise:IAPIResponse:ICollectionData
updateCollection()Updates a collection dataguid: string, bodyParams: IUpdateCollectionModelPromise:IAPIResponse:ICollectionData
deleteCollection()Deletes a collectionguid: stringPromise:IAPIResponse 
getCollectionList()Recives multiple collections and datapage: number or null = null, itemsPerPage: number or null = null, search: string or null = null, orderBy: string or null = null, includeThumbnails: boolean or null = nullPromise:IAPIResponse:IListResponse:ICollectionData
createCollection()Creates a collectionbodyParams: IUpdateCollectionModelPromise:IAPIResponse:ICollectionData

Manage Videos

MethodDescriptionParametersResponse
getVideoRecives a video databodyParams: ICreateVideoModelPromise:IAPIResponse:IVideoData
listVideos()Recives multiple videos and datapage: number or null = null, itemsPerPage: number or null = null, search: string or null = null, collection: string or null = null, orderBy: string or null = nullPromise:IAPIResponse:IListResponse:IVideoData
createVideo()Creates a videobodyParams: ICreateVideoModelPromise:IAPIResponse:IVideoData
deleteVideo()Deletes a videoguid: stringPromise:IAPIResponse
0.1.6

12 months ago

0.1.5

12 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago