Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weejewel/node-cyfe
Simple wrapper to talk with the Cyfe API.
https://github.com/weejewel/node-cyfe
Last synced: about 1 month ago
JSON representation
Simple wrapper to talk with the Cyfe API.
- Host: GitHub
- URL: https://github.com/weejewel/node-cyfe
- Owner: WeeJeWel
- Created: 2019-12-16T16:52:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T09:34:07.000Z (over 2 years ago)
- Last Synced: 2024-10-12T22:44:56.909Z (4 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cyfe
Simple wrapper to talk with the [Cyfe API](https://www.cyfe.com/api).
## Installation
```
$ npm i cyfe
```## Examples
First, add a Push API widget (_Add Widget > Custom > Push API_) and find your ID.
```javascript
const Cyfe = require('cyfe');
const cyfe = new Cyfe({
id: '', // 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);
});
```