nodejs-one-signal

1.1.0 • Public • Published

node-one-signal

A Nodejs wrapper for the One Signal API

Installation

You can install the package via npm:

npm install nodejs-one-signal

Usage

Add a new device

const OneSignal = require('nodejs-one-signal');

const client = new OneSignal('appId', 'restApiSecret');

client.addDevice({
    "identifier": "ce777617da7f548fe7a9ab6febb56cf39fba6d382000c0395666288d961ee566",
    "timezone": "-28800",
    "device_type": 1
}).then(response => {
    console.log(response);
}).catch(err => {
    console.log(err);
})

In progress, feel free to submit PRs

Testing

npm run test

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

Package Sidebar

Install

npm i nodejs-one-signal

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

6.51 kB

Total Files

6

Last publish

Collaborators

  • ghaffaru