0.0.4 • Published 8 years ago
allu-client v0.0.4
allu-client
Node and CLI client for calling into the Allu API.
Installation
$ npm install allu-clientUsage
Node:
const Allu = require('allu-client');
const client = new Allu('access token', 'base url');
client.text('tag', 'message', (err, resp, body) => {
  // Handle response
});CLI:
$ allu --type text --tag tag --message message
{
  "success": true,
  ...
}Authentication
Specify the Allu server base URL as environment variable ALLU_BASE_URL, or as the baseURL property of the config file ~/.allu.
Similarly, pass the Allu access token either as the environment variable ALLU_ACCESS_TOKEN, or as the accessToken property of the config.
For example:
$ cat ~/.allu
{
  "accessToken": "...",
  "baseURL": "https://allu.example.com"
}In the CLI, you can pass --skip-auth to skip authentication entirely.