Skip to content

theberrics/nodejs-ooyala-v2-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#NODE.JS wrapper for OoyalaAPI client API V2

##Usage This sdk can be used with normal callbacks pattern or with a promise pattern.

###Callback pattern:

var Ooyala = require('ooyala-v2-sdk');

var _api_secret_key = 'foo secret';
var _api_key = 'foo';

var ooyala = new Ooyala(_api_key, _api_secret_key);

var path = "/v2/assets";
var params = {"where": "asset_type='remote_asset'", "limit": 500};
var body = {};
var onSuccess = function(data){console.log(data)};
var onError = function(error){console.log(error)};

ooyala.get(path, params, body, onSuccess, onError)

###Promises pattern

var Ooyala = require('ooyala-v2-sdk');

var _api_secret_key = 'foo secret';
var _api_key = 'foo';

var ooyala = new Ooyala(_api_key, _api_secret_key);

var path = "/v2/assets";
var params = {};
var body = {};

var onSuccess = function(data){console.log(data)};
var onError = function(error){console.log(error)};

ooyala.get(path, params, body).then(onSuccess, onError);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%