Skip to content

Wrapper for the Pushover API. Lets you send push notifications to your devices easiliy

Notifications You must be signed in to change notification settings

ryanfarber/notify

Repository files navigation

notify

this is a wrapper for the Pushover API, which lets you easily send push notifications to your devices.

There are a few added functionalities.

usage

const Notify = require("@ryanforever/notify")
const notify = new Notify({
    user: process.env.PUSHOVER_USER,
    token: process.env.PUSHOVER_TOKEN,
    appName: "test" // optional name to prefix the notification title
})

notify("Hello! This is a test.")

notification

other methods

notify("sends a message")
notify.send("sends a message")

notify.error("something went wrong") // send an error notification
notify.warn("uh oh!")  // send a warning notification

options

please refer to Pushover's Documentation for what options you can pass in

notify("Check this out", {
    title: "Wow!",
    url: "https://example.com",
    // ...more options below
})
key description
title your message's title, otherwise your app's name is used
url a supplementary URL to show with your message
urlTitle a title for the URL specified as the url parameter, otherwise just the URL is shown
html set to true to enable HTML parsing
ttl a number of seconds that the message will live, before being deleted automatically
sound the name of a supported sound to override your default sound choice
priority a value of -2, -1, 0 (default), 1, or 2
attachment a binary image attachment to send with the message
attachmentBase64 a Base64-encoded image attachment to send with the message

About

Wrapper for the Pushover API. Lets you send push notifications to your devices easiliy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published