1.0.6 • Published 3 months ago

@ryanforever/notify v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

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
})
keydescription
titleyour message's title, otherwise your app's name is used
urla supplementary URL to show with your message
urlTitlea title for the URL specified as the url parameter, otherwise just the URL is shown
htmlset to true to enable HTML parsing
ttla number of seconds that the message will live, before being deleted automatically
soundthe name of a supported sound to override your default sound choice
prioritya value of -2, -1, 0 (default), 1, or 2
attachmenta binary image attachment to send with the message
attachmentBase64a Base64-encoded image attachment to send with the message
1.0.6

3 months ago

1.0.5

6 months ago

1.0.4

8 months ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago