node-ooyala-api-client

Ooyala API Client

NODE JS wrapper for OoyalaAPI client API (v2 fashion API with sha256 signing)

Usage:

var OoyalaApi = require("node-ooyala-api-client");

var apiKey = "foo"; var apiSecret = "foo secret"; var hostName = "localhost"; var hostPort = 3101;

var client = new OoyalaApi(apiKey, apiSecret, hostName, hostPort);

var headers = null; var apiPath = "/test" var queryStringParams = { foo: 1 }; var callbacksContext = { statusCallback : function(statusCode, responseHeader) { console.log(statusCode, responseHeader); }, dataCallback : function(data) { console.log("Body is", data); }, errorCallback : function(error) { console.log(error); } } client.get(headers, apiPath, queryStringParams, callbacksContext.statusCallback, callbacksContext.dataCallback, callbacksContext.errorCallback, callbacksContext);

var body = "hello world";

client.post(headers, apiPath, queryStringParams, body, callbacksContext.statusCallback, callbacksContext.dataCallback, callbacksContext.errorCallback, callbacksContext);