0.0.5 • Published 6 years ago

vzaar-api-v2 v0.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

An unofficial node.js client for the vzaar API.


vzaar is the go to video hosting platform for business. Affordable, customizable and secure. Leverage the power of online video and enable commerce with vzaar. For more details and signup please visit http://vzaar.com


Installation

npm install 'vzaar-api-v2'

Usage

var Vzaar = require("vzaar-api-v2");
var vzaarAPI = new Vzaar( authToken,clientId);

Endpoints:

Getting details from video:
vzaarAPI.lookupVideo(videoId, callback);
Fetching videos:
vzaarAPI.getVideos(callback);

Example:

vzaarAPI.lookupVideo("17447571",function(err,res,body){
	console.log(err,body);
});
Editing existing video:
vzaarAPI.updateVideo(videoId,title,description,callback);
Deleting video from vzaar:
vzaarAPI.deleteVideo(videoId, callback);

Uploading Video:

Generating Signature:
const filePath = "videoplayback.mp4";
vzaarAPI.getSignature(filePath,"multipart",function(err,res,body){

	var path = require('path');

	var fileName = path.parse(filePath).base;

	body.data.key = body.data.key.replace( "${filename}", fileName+".0" );
	
	console.log(body.data);// this is the signature	
	
	

})
Uploading Video
vzaarAPI.uploadVideo(body.data,"multipart",function(statusCode,guid){

	console.log(statusCode);
	console.log(guid);
		
});
Create Video
vzaarAPI.createVideo(guid, "Sample Title", "Sample Description" , function(err,res,body){
				
	console.log(err,body);
			
})

Example:

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

6 years ago