https://github.com/ryanfarber/notify
Wrapper for the Pushover API. Lets you send push notifications to your devices easiliy
https://github.com/ryanfarber/notify
alerts android ios macos notifications push-notifications
Last synced: about 2 months ago
JSON representation
Wrapper for the Pushover API. Lets you send push notifications to your devices easiliy
- Host: GitHub
- URL: https://github.com/ryanfarber/notify
- Owner: ryanfarber
- Created: 2022-09-23T00:25:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-27T12:36:53.000Z (almost 2 years ago)
- Last Synced: 2025-01-13T04:08:48.371Z (over 1 year ago)
- Topics: alerts, android, ios, macos, notifications, push-notifications
- Language: JavaScript
- Homepage:
- Size: 150 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# notify
this is a wrapper for the [Pushover](https://pushover.net) API, which lets you easily send push notifications to your devices.
There are a few added functionalities.
## usage
```javascript
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.")
```

## other methods
```javascript
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](https://pushover.net/api) for what options you can pass in
```javascript
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 |