-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathREADME
32 lines (21 loc) · 1011 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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);