node-pushover-client

Send push notifications to iOS and Android using Pushover.

node-pushover-client

Send push notifications to iOS and Android using Pushover.

Register an application with Pushover.net to get your application and user tokens. You may optionally set PUSHOVER_TOKEN and PUSHOVER_USER environment variables to use as default values.

var Pushover = require('node-pushover-client');
 
var pushNotification = new Pushover({
  token: 'KzGDORePK8gMaC0QOYAMyEEuzJnyUi',
  user: 'uQiRzpo4DXghDmr9QzzfQu27cmVRsG'
});
 
var req = pushNotification.send({ message: 'OH HAI' });
 
req.then(function (res) {
  console.log(res);
});

You can also pass the application token and/or user token alongside send() data.

var req = (new Pushover()).send({
  token: 'KzGDORePK8gMaC0QOYAMyEEuzJnyUi',
  user: 'uQiRzpo4DXghDmr9QzzfQu27cmVRsG',
  message: 'OH HAI'
});
$ npm -g install node-pushover-client
$ pushover --help

Type: String Default: PUSHOVER_TOKEN env variable

Application token you receive after registering an application with Pushover.net.

Type: String Default: PUSHOVER_USER env variable

User token. You can find this on your Pushover.net dashboard.

Type: String

Message to push to your mobile device.

Type: String

Message title. If not specified then Pushover will use the application name as the message title.

Type: Number Default: 0

Message priority may be -1 (lowest) to 2 (highest). Refer to Pushover API for more information.

Type: Number

Number of seconds to keep trying to send a priority-2 message.

Type: Number

Interval (in seconds) between priority-2 message retries.

Type: Number Default: current time

A Unix timestamp. The client automatically sets this to avoid messages showing up out of order on the device.

Type: String

Name of device to send the notification.

Type String

Supplementary URL.

Type: String Default: URL

Title for supplementary URLs.

Type: String

Name of a supported sound to play on the app.

The MIT License (MIT)

Copyright (c) 2013 David Lane

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.