Skip to content

README.md documentation to send to multiple users is un-necessarily complicated #34

@saltyzoo

Description

@saltyzoo

The following works just fine to send to multiple users and is a one-line modification of the general "Sending a Message" example, rather than an unneeded loop:

var Push = require( 'pushover-notifications' )

var p = new Push( {
user: 'token1, token2, token3',
token: process.env['PUSHOVER_TOKEN'],
// httpOptions: {
// proxy: process.env['http_proxy'],
//},
// onerror: function(error) {},
// update_sounds: true // update the list of sounds every day - will
// prevent app from exiting.
})

var msg = {
// These values correspond to the parameters detailed on https://pushover.net/api
// 'message' is required. All other values are optional.
message: 'omg node test', // required
title: "Well - this is fantastic",
sound: 'magic',
device: 'devicename',
priority: 1
}

p.send( msg, function( err, result ) {
if ( err ) {
throw err
}

console.log( result )
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions