1.0.5 • Published 3 years ago

@smiirl/smiirl-library-js v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

smiirl-library-js

To use the library, you need to install this library with npm.

npm install smiirl/smiirl-library-js

Usage

Generate json response

const { Counter } = require("@smiirl/smiirl-library-js");
Counter.jsonResponse(12345);
Counter.stringResponse(12345);

Reset to 0

const { Counter } = require("@smiirl/smiirl-library-js");
// Get the real values from your counter in https://my.smiirl.com
const mac = "e08e00000000";
const token = "abcdef123456";
const counter = new Counter(mac, token);
counter.reset().then(function(json) {
    console.log("Counter Reset Response", json)
})

Push a number

counter.push(12345).then(function(json) {
    console.log("Counter Push Response", json)
})

Add a number to the current value

counter.add(21).then(function(json) {
    console.log("Counter Add Response", json)
})

Custom Counters

Smiirl Custom Counters are available on our website https://www.smiirl.com.

1.0.5

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago