FrontApp Node.js API Wrapper
npm install frontapp-node
npm test
Compile using babel:
gulp babel
Require FrontApp:
var FrontApp = require('./dist/index');
Require FrontApp:
var FrontApp = require('frontapp-node');
Create a client:
var client = new FrontApp.Client('token');
This client library supports two kinds of callbacks:
client.analytics.get({}, function (err, r) {
// err is an error response object, or null
// r is a successful response object, or null
});
This client library also supports using Promises instead of callbacks:
client.analytics.get({}).then(function (r) {
// ...
});
// To get statistics about activities happening in Front, you need to requests the correspondig metrics of the analytics.
client.analytics.get({
start: '',
end: '',
metrics: []
}, callback);