0.0.4 • Published 7 years ago

frontapp-node v0.0.4

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

frontapp

FrontApp Node.js API Wrapper

Installation

npm install frontapp-node

Testing

npm test

Running the code locally

Compile using babel:

gulp babel

Require FrontApp:

var FrontApp = require('./dist/index');

Usage

Require FrontApp:

var FrontApp = require('frontapp-node');

Create a client:

Using Personal Access Tokens

var client = new FrontApp.Client('token');

Callbacks

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
});

Promises

This client library also supports using Promises instead of callbacks:

client.analytics.get({}).then(function (r) {
  // ...
});

Analytics

// 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);
0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago