{"id":13732044,"url":"https://github.com/qbit/node-pushover","last_synced_at":"2025-04-05T09:09:39.249Z","repository":{"id":2864448,"uuid":"3869538","full_name":"qbit/node-pushover","owner":"qbit","description":"Pushover notifications for node.js (JavaScript,NodeJS)","archived":false,"fork":false,"pushed_at":"2020-01-30T23:37:03.000Z","size":83,"stargazers_count":161,"open_issues_count":4,"forks_count":60,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-18T16:46:09.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-29T19:14:13.000Z","updated_at":"2023-11-20T19:23:14.000Z","dependencies_parsed_at":"2022-08-17T05:30:37.066Z","dependency_job_id":null,"html_url":"https://github.com/qbit/node-pushover","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnode-pushover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnode-pushover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnode-pushover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnode-pushover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbit","download_url":"https://codeload.github.com/qbit/node-pushover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271473,"owners_count":20911586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:44.624Z","updated_at":"2025-04-05T09:09:39.191Z","avatar_url":"https://github.com/qbit.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"![Pushover](img/pushover-header.png)\n\nSend [pushover.net](http://pushover.net) notifications from Node.JS\n\n[![Build Status](https://travis-ci.org/qbit/node-pushover.svg?branch=master)](https://travis-ci.org/qbit/node-pushover)\n[![Coverity Scan Build Status](https://scan.coverity.com/projects/10939/badge.svg)](https://scan.coverity.com/projects/qbit-node-pushover)\n\n\n[![NPM](https://nodei.co/npm/pushover-notifications.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/pushover-notifications/)\n\n## Usage\n\n### Install\n\n\tnpm install pushover-notifications\n\n### Pushover API values\n\nAny API parameters, as found on https://pushover.net/api, can be passed in the object. For example, `retry` and `expire` can be added to the object being passed to `.send`! Here's an example with many different parameters.\n```javascript\nvar msg = {\n  message: \"This is a message\",\n  title: \"Well - this is fantastic\",\n  sound: 'magic',\n  device: 'test_device',\n  priority: 2,\n  url: \"http://pushover.net\",\n  url_title: \"Pushover Website\"\n}\n```\n## Examples\n\n### Sending a message\n```javascript\n\nvar Push = require( 'pushover-notifications' )\n\nvar p = new Push( {\n  user: process.env['PUSHOVER_USER'],\n  token: process.env['PUSHOVER_TOKEN'],\n  // httpOptions: {\n  //   proxy: process.env['http_proxy'],\n  //},\n  // onerror: function(error) {},\n  // update_sounds: true // update the list of sounds every day - will\n  // prevent app from exiting.\n})\n\nvar msg = {\n  // These values correspond to the parameters detailed on https://pushover.net/api\n  // 'message' is required. All other values are optional.\n  message: 'omg node test',\t// required\n  title: \"Well - this is fantastic\",\n  sound: 'magic',\n  device: 'devicename',\n  priority: 1\n}\n\np.send( msg, function( err, result ) {\n  if ( err ) {\n    throw err\n  }\n\n  console.log( result )\n})\n```\n\n### Sending a message with an attachment (blocking)\n```javascript\n\nvar Push = require( 'pushover-notifications' )\n\nvar p = new Push( {\n  user: process.env['PUSHOVER_USER'],\n  token: process.env['PUSHOVER_TOKEN'],\n  // httpOptions: {\n  //   proxy: process.env['http_proxy'],\n  //},\n  // onerror: function(error) {},\n  // update_sounds: true // update the list of sounds every day - will\n  // prevent app from exiting.\n})\n\nvar msg = {\n  // These values correspond to the parameters detailed on https://pushover.net/api\n  // 'message' is required. All other values are optional.\n  message: 'omg node test',\t// required\n  title: \"Well - this is fantastic\",\n  sound: 'magic',\n  device: 'devicename',\n  priority: 1,\n  file: '/tmp/fantastic.png' // this will read using fs.readFileSync()!\n}\n\np.send( msg, function( err, result ) {\n  if ( err ) {\n    throw err\n  }\n\n  console.log( result )\n})\n```\n\n### Sending a message with an attachment (non-blocking)\n```javascript\n\nvar Push = require( 'pushover-notifications' )\nvar fs = require( 'fs' )\n\nfs.readFile('/tmp/fantastic.png', function(err, data) {\n  var p = new Push( {\n    user: process.env['PUSHOVER_USER'],\n    token: process.env['PUSHOVER_TOKEN'],\n    // httpOptions: {\n    //   proxy: process.env['http_proxy'],\n    //},\n    // onerror: function(error) {},\n    // update_sounds: true // update the list of sounds every day - will\n    // prevent app from exiting.\n  })\n\n  var msg = {\n    // These values correspond to the parameters detailed on https://pushover.net/api\n    // 'message' is required. All other values are optional.\n    message: 'omg node test',\t// required\n    title: \"Well - this is fantastic\",\n    sound: 'magic',\n    device: 'devicename',\n    priority: 1,\n    file: { name: 'fantastic.png', data: data }\n  }\n  \n  p.send( msg, function( err, result ) {\n    if ( err ) {\n      throw err\n    }\n  \n    console.log( result )\n  })\n})\n```\n\n### Sending a message to multiple users\n\n```javascript\n\nvar users = [\n  'token1',\n  'token2',\n  'token3'\n]\n\nvar msg = {\n  message: 'omg node test',\n  title: \"Well - this is fantastic\",\n  sound: 'magic' // optional\n  priority: 1 // optional,\n  file: '/tmp/fancy_image.png' // optional\n  // see test/test_img.js for more examples of attaching images\n}\n\nfor ( var i = 0, l = users.length; i \u003c l; i++ ) {\n  msg.user = users[i]\n  // token can be overwritten as well.\n\n  p.send( msg, function( err, result ) {\n    if ( err ) {\n      throw err\n    }\n\n    console.log( result )\n  })\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Fnode-pushover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbit%2Fnode-pushover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Fnode-pushover/lists"}