1.0.1 • Published 4 years ago

cyfe v1.0.1

Weekly downloads
24
License
-
Repository
-
Last release
4 years ago

Cyfe

Simple wrapper to talk with the Cyfe API.

Installation

$ npm i cyfe

Examples

First, add a Push API widget (Add Widget > Custom > Push API) and find your ID.

const Cyfe = require('cyfe');
const cyfe = new Cyfe({
   id: '<your widget key>', // e.g. 5df77205376f07353893125957962
});

cyfe.pushIncrement({
  key: 'Activations', // Can be any key. This will show up in the chart.
}).then(() => {
  console.log('Incremented by 1');
}).catch(err => {
  console.error('Error:', err);
});