node-ooyala-api-client

Ooyala API Client

npm install node-ooyala-api-client
1 downloads in the last day
28 downloads in the last week
83 downloads in the last month

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);

npm loves you