An easy-to-use Javascript API wrapper for accessing the Limelight Orchestrate Video REST API. Mainly developed to be used as a node.js module.
npm install limelight-utilsrequire limelight-utils- provide configuration with config() or ContentAPI
- use the API
var conf = {
limelight : {
organization: '<ORGANIZATION_ID>',
accessKey: '<LIMELIGHT_ACCESS_KEY>',
secret: '<LIMELIGHT_SECRET_KEY>'
}
}
var limelight = require('limelight-utils').ContentAPI(conf)
limelight.listChannelGroups(function(err, res) {
console.log('Channel Groups', res)
})The API is a thin wrapper around the Limelight Orchestra Content API. At the current version it's not doing a whole lot of error checking etc on the parameters (pull requests welcome!) so if you get an empty response, that might be the reason. Typically, the Limelight REST API doesn't provide very useful error messages in malformed request parameter cases, so if you get empty responses, that is most likely the reason.
In most methods the parameters are self explanatory, URL parameters and strutures are typically passed through as-is. Refer to Limelight documentation
listChannelGroups (cb)
listChannels (groupId, cb)
listChannelProperties (channelId, cb)
listMedia (channelId, cb)
listMediaChannels (mediaId, cb)
listAllChannels (cb)
listMediaEncodings (mediaId, cb)
searchMedia (params, cb)
listProperties (mediaId, cb)
listCues (mediaId, cb)
- mediaId - media ID
- cues - dictionary in the same format as specified in Limelight API. NOTE: JSON encoding is significant in the ad object
updateCues (mediaId, cues, cb)
The cues parameter should be an array of Limelight cue JSON objects such as this:
{
"placement":"BEFORE",
"startPositionInMilliseconds":-2147483648,
"endPositionInMilliseconds":-2147483648,
"name":"Pre-Roll (via web)",
"index":0,
"details": JSON.stringify({
"adType":"VAST",
"isOverlay":false,
"trackingPixelUrls": "<trackingPixelUrl>",
"adDetails": {
"url":"<adurl>"
}
})
}putMediaToChannel (mediaId, channelId, cb)
removeMediaFromChannel (mediaId, channelId, cb)
getMedia (mediaId, cb)
uploadMedia (props, cb)