A nodejs client library for the Liverail platform's API
This provides a node client library to use the Liverail API.
Created by Pinion.
npm install liverail-api
var liverail = require'liverail-api';liveraillogin'username' 'password'liverailcall'/entity/list'if errconsole.error"Oh no!"elseconsole.logresultentities;;
var liverail = require'liverail-api';liveraillogin'username' 'password'var params =order_line_id: '123'time_end: '2012-02-22 00:00:00'liverailcall'/order/line/edit' paramsif errconsole.error"Oh no!";;
login takes 3 arguments; username, password and a callback, to which it will pass an error indicator and the results from Liverail in case you're interested in them.
call is a generic call function that will call a specified route on the liverail API. The token is added automatically, but you may pass an object with additional parameters to send to the api. You may also pass a callback, which will be called with an error indicator and the results of the API call.