A 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
npm install 'vzaar'
var Vzaar = require("vzaar");
var api = new Vzaar.Api({token: "API token", login: "vzaar login"});
If your login and API token are correct, you should be able to fetch your login by calling:
api.whoAmI(function(statusCode, data) {
console.log(data.vzaar_api.test.login);
});
Note: api#videoDetails and api#videoList don't require authentication when API public feed option is enabled for given account. api#userDetails and api#accountType are public.
api.accountType(accountTypeId, callback);
api.userDetails(username, callback);
api.videoDetails(videoId, callback, params);
api.videoList(login, callback, params);
Example:
api.videoList("username", function(statusCode, data) {
// callback body
}, { count:, 5, labels: "foo, bar" });
api.editVideo(videoId, callback, data);
Example:
api.editVideo(123, function(statusCode, data) {
// callback body
}, { title:, "my video" });
api.deleteVideo(videoId, callback);
Not supported yet
api.s3Upload(pathToFile, callback);
api.processVideo(callback, data);
Example:
api.processVideo(function(statusCode, data) {
// callback body
}, { guid:, "GUID", title: "my video", profile: 3 });
api.uploadAndProcessVideo(path, callback, data);
Example:
api.uploadAndProcessVideo("./path/to/my/video.mp4", function(statusCode, data) {
// callback body
}, { title: "my video", profile: 3 });
api.linkUpload(callback, data);
Example:
api.linkUpload(function(statusCode, data) {
// callback body
}, { encoding_params: { size_id: 3, title: "my title" },
url: "http://samples.mplayerhq.hu/MPEG-4/turn-on-off.mp4" });
api.uploadThumbnail(videoId, callback, data);
Example:
api.uploadThumbnail(12345, function(statusCode, data) {
// callback body
}, { path:, "./path/to/pic.jpg" });
api.generateThumbnail(videoId, callback, data);
Example:
api.generateThumbnail(function(statusCode, data) {
// callback body
}, { time:, 2 });
api.addSubtitle(callback, data);
Example:
api.addSubtitle(function(statusCode, data) {
// callback body
}, { body: "1\n00:00:17,440 --> 00:01:20,375\n ......", language: "en" });
api.signature(callback, params);
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Released under the MIT License.