tycrek / node-lametric-local

Send notifications to your LaMetric Time over a local network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lametric-notify-local

NPMCBT badge

Send notifications to your LaMetric Time over a local network.

Installation

Run npm i lametric-notify-local to install.

Usage

Some things to note:

// 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.

About

Send notifications to your LaMetric Time over a local network

License:ISC License


Languages

Language:TypeScript 100.0%