npm install localyticsLocalytics API wrapper.
- Configurable from __env__ variables or a source code
- Returns a promise
- Don't require external modules
- Capable of using Keep-Alive connections
So far only Profiles API
is implemented.
Installation
============
npm i localytics --save
Usage
=====
Define API Keys LOCALYTICS_KEY and LOCALYTICS_SECRET. You can find them in your
localitics profile.
Keys can be passed from env or as arguments when library is initialized:
``javascript`
var localytics = require('localytics')('MY_API_KEY', 'MY_API_SECRET');`
or from shell, or Heroku Config Varsbash`
export LOCALYTICS_KEY="MY_API_KEY"
export LOCALYTICS_SECRET="MY_API_SECRET"
Example
=======
`javascript
var localytics = require('localytics')();
localytics.setProfile('Bob', {
"$first_name": 'Bob',
favoriteNumber: 7,
toDelete: null,
}).then(console.log).catch(console.log);
``
Promises
=========
To Do
=====