Skip to content

brianjd/pushwoosh.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

PushWoosh.js

Pushwoosh.js is a wrapper for the PushWoosh REST API

NOTE: This is a WIP, not thoroughly tested.

Installation

$ npm install PushWoosh.js

Usage

var PushWoosh = require('PushWoosh.js'),
pushWoosh = new PushWoosh({
  auth: your_auth_key,
  application: your_application_id
});

The methods available mirror that of the PushWoosh API, ie:

  • createMessage
  • deleteMessage
  • registerDevice
  • unregisterDevice
  • setTags
  • getTags
  • setBadge
  • pushStat
  • getNearestZone

See the PushWoosh API documentation for more information.

pushWoosh.createMessage({
  // see PushWoosh API reference
})
.then(function (response) {
    // do something
})
.fail(function (err) {
    // do something
});

If you need to override the application ID or supply an application group instead, you can do so:

pushWoosh.createMessage({
    application: your_id_here,
    notifications: []
}).then().fail();

More documentation to come.

About

PushWoosh API Wrapper for Node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages