lametric-notify-local
v0.2.2
Published
Send notifications to your LaMetric Time over a local network
Downloads
3
Readme
lametric-notify-local
Send notifications to your LaMetric Time over a local network.
Installation
Run npm i lametric-notify-local
to install.
Usage
Some things to note:
- The IP address of your LaMetric can be found in the official LaMetric app.
- Your API Key can be found on the LaMetric developer site, under the My Devices tab.
- Available icons for frames can be found on the LaMetric icon gallery.
// Import the module
const { LaMetric } = require('lametric-notify-local');
// Create a LaMetric object
const lm = new LaMetric(IP_ADDRESS, API_KEY);
// Send the model. Returns a Promise with an Axios response.
lm.send({
model: {
frames: [
{ text: 'Hello' },
{ text: 'World', icon: 4612 }
]
}
})
.then(console.log)
.catch(console.err);
See test.js for a complete example.