1.2.0 • Published 3 years ago

@hushpoison/vimeo-api v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm License

Interacting with the Vimeo API using Node.js

Get started with the Vimeo API

Install the Node.js library

To install Node.js, run the following command:

 npm install @hushpoison/vimeo-api

Genarate Upload Link

 vimeoUploadLink(fileLength: number, fileName: string)
 

Upload Video Blob (url = genarated url from above function)

 uploadBlob(file: Buffer, url: string, s:() => void , e:(error:string) => void)
 

Get Thubnails

 thumbnailForPrivateVideo(id: string, thumbnailWidth: number)
 thumbnailForPublicVideo(id: string, thumbnailWidth: VideoSize)

Delete video(id = vimeo video id)

 deleteVideo(id: string)
 

Insert Video To Folder in Vimeo

 moveToFolder(id: string, folderId: string)
 

Advanced examples

let data = readFileSync('./lib/example/mnv.mp4');
const t = Vimeo({
  token: '--------------------',
});

(async () => {
  try {
    const {uploadLink,uri,videoUrl} = await t.vimeoUploadLink(filesize, 'filename'); //filesize is (buffer length) size of the upload file
     t.uploadBlob(file,uploadLink,()=>console.log(success),(e:string)=>console.log(error)) //file must be buffer or blob
  } catch (error) {
    console.log(error);
  }
})();

(async () => {
  try {
    const c = await t.transcodeStatus('726466895');
    const y = await t.thumbnailForPrivateVideo('726466895', 640);
  } catch (error) {
    console.log(error);
  }
})();

Credits

https://github.com/Applicafroguy/vimeo-uploader

1.2.0

3 years ago

1.1.0

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago