jsPlatform API
This is a simple wrapper for NodeJS around the jsPlatform API to make api calls easier.
Installation
npm install jwplatform-api
Usage
Creating a new jwPlatform API object:
var jwPlatform = ; //initialize with your key and secretvar api = key: '...' secret: '...'; //initialize with custom loggervar logger = {} {};var api = ... logger; //initialize with no loggingvar api = ... {};
Make arbitrary queries:
api; var template = name: 'Test template' format_key: 'ogg' default: 'none'; api;
There are a few shortcuts for common api calls:
Generating an upload URL
api;
Getting information about a video (conversions/list wrapper)
api;
Template stuff
var template = name: 'the name' format_key: 'ogg' default: 'none';api; var fields = template_key: '...' name: 'the new name';api; api;