To install Node.js, run the following command:
npm install @hushpoison/vimeo-api
vimeoUploadLink(fileLength: number, fileName: string)
uploadBlob(file: Buffer, url: string, s:() => void , e:(error:string) => void)
thumbnailForPrivateVideo(id: string, thumbnailWidth: number)
thumbnailForPublicVideo(id: string, thumbnailWidth: VideoSize)
deleteVideo(id: string)
moveToFolder(id: string, folderId: string)
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);
}
})();