Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

BigGo Video API Client

First Step

To get started, first obtain an API key and secret from BigGo API. Then, use the following code to obtain an API client:

import { auth, api } from "biggo-api"

const client = auth.getJWTClient({
  client_id: "<client id>",
  client_secret: "<client secret>"
})

const video = api.video({ client })

Usage

Get

get a video information.

video.get(<video id>)

  • Return: Promise<[Video]|undefined> undefined if video not found
video.get("<video id>")

Create

Upload new video.

video.upload([Options])

  • Return: Promise<string> video id
video.upload({
  file: "<video file path>",
  description: "upload via api",
  access: "public",
  thumbnailTime: 0,
})

[Options]

required type description
file ✔️ string video file path
title ️️️️️️️️✔️ string video title
description ✔️ string video description
access ✔️ public private unlisted video visibility setting
thumbnailTime number micro second of thumbnail in video

Update

Update video info.

video.update(<video id>, [Options])

  • Return: Promise<boolean> true if updated success
video.update("<video id>", {
  description: "upload via api",
  access: "public",
  thumbnailTime: 0,
})

[Options]

required type description
title ️️️️️️️️ string video title
description string video description
access public private unlisted video visibility setting
thumbnailTime number micro second of thumbnail in video

Delete

Remove video.

video.delete(<video id>)

  • Return: Promise<boolean> true if removed success
video.delete("<video id>")