npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

pushover-open-client

v0.0.2

Published

Pushover Open Client

Readme

Node Pushover Open Client

Pushover Open Client

Installation

npm install pushover-open-client

Usage

See pushover documentation here https://pushover.net/api/client

1. login

The first step is to login to to Pushover. This will give a secret that will be used for all subsequent requests.

var PushoverOpenClient = require('pushover-open-client');
var poc = new PushoverOpenClient({
  email: '[email protected]',
  password: 'something secure'
});

poc.login(function (err, body) {
  if (err)
    throw err;
  console.log(body);
});

will yield something like (data changed for privacy reasons)

{
  "status": 1,
  "id": "...",
  "secret": "1234",
  "request": "..."
}

2. register device

The next step is to use the secret to register a new Pushover client. This module will automatically store the secret retrieved during .login() to be used during subsequent requests. You may also pass the secret in as part of the constructor to skip the login step in the future.

poc.register('my-new-device', function (err, body) {
  if (err)
    throw err;
  console.log(body);
});

will yield something like this:

{
  "id": "5678",
  "status": 1,
  "request": "..."
}

id in the above payload represents the new device_id. Like the secret during .login(), this parameter will be stored for subsequent requests. You may also pass it in to the constructor to skip the .register() step in the future.

3. fetch and delete queued messages

This will download all pending notifications, and also delete them from the server (signifying you have seen them)

poc.fetchAndDeleteMessages(function (err, messages) {
  if (err)
    throw err;
  console.log(messages);
});

will yield something like this

[
  {
    "id": 2,
    "message": "This device (my-new-device) is now able to receive notifications and your 7-day trial has started.\n\nVisit https://pushover.net/apps to view apps, plugins, and services to use with Pushover just by supplying your user key:\n\n...",
    "app": "Pushover",
    "aid": 1,
    "icon": "pushover",
    "date": 1463500372,
    "priority": 0,
    "acked": 0,
    "umid": 4460,
    "title": "Welcome to Pushover!"
  }
]

4. watch for new notifications

This will start an EventEmitter that will watch for new notifications to fetch and delete automatically for 5 seconds.

poc.on('message', function (message) {
  console.log(message);
});
poc.startWatcher();
setTimeout(function () {
  poc.stopWatcher();
}, 5 * 1000);

will yield something like this

{
  "id": 4,
  "message": "hello node!",
  "app": "Pushover",
  "aid": 1,
  "icon": "pushover",
  "date": 1463501187,
  "priority": 0,
  "acked": 0,
  "umid": 4464,
  "title": "test"
}

License

MIT License