pushover.js
node.js API wrapper for Pushover with Typescript support
Installation
yarn add @stingalleman/pushover.js # or npm install @stingalleman/pushover.js
Example
const { Pushover } = require("../dist/index");
const pushover = new Pushover("APPLICATION-TOKEN");
async function init() {
await pushover.message.send("This is a notification title!", {
message: "Sick notification",
user: "USER-TOKEN"
});
}
init();
You're also able to set a default user token:
const { Pushover } = require("../dist/index");
const pushover = new Pushover("APPLICATION-TOKEN", "USER-TOKEN");
async function init() {
await pushover.message.send("This is a notification title!");
}
init();
Documentation is located here
Why that stupid name?
Because NPM threw this error at me:
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/pushover.js - Package name too similar to existing packages; try renaming your package to '@stingalleman/pushover.js' and publishing with 'npm publish --access=public' instead