node-pushy

0.0.2 • Public • Published

node-pushy

npm version

A node wrapper for Pushy

More information on Pushy.

Installation

NPM

npm install node-pushy

Node

Add to package.json: "pushy": "0.0.1".

Usage

Requires:

  • A pushy.me account
  • An api key
  • A list of android user tokens generated from the Pushy SDK
// Create a pushy object
var pushy = require('node-pushy')(<api_key>);

// or
var pushy = require('node-pushy')();
pushy.setApiKey(<api_key>);

// Send push notifications
pushy
    .send({message: "You're a bouse!"}, [<userToken1>, <userToken2>])
    .then(function(statusCode){
        console.log('Success!');
    })
    .catch(function(error){
        console.log('Failed: ' + error.message);
    });

Readme

Keywords

Package Sidebar

Install

npm i node-pushy

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • andykingking