Wrapper module for OneSignal push notification delivery
npm install onesignal


A Wrapper for OneSignal Push Notification Delivery for Node.js. Provides the minimal functionality to send notifications for iOS and Android.
```
npm install onesignal --save
`js``
// Create a client object
var oneSignal = require('onesignal')('[apiKey]', '[appId]', true);
| Param | Type | Description |
| --- | --- | --- |
| apiKey | String | REST API Key |
| appId | String | OneSignal App ID |
| sandbox | Boolean | use the sandbox certificate for iOS (default: false) |
PromiseRegister a new device and its identifier to OneSignal and get OneSignal ID
PromiseUpdate the identifier of an existing device
PromiseCreate and send a notification
Returns: Promise - resolve with OneSignal ID
| Param | Type | Description |
| --- | --- | --- |
| identifier | String | the device token |
| osType | String | ios, android |
| Param | Type | Description |
| --- | --- | --- |
| oneSignalId | String | the one signal device id |
| newIdentifier | String | the new device token |
| Param | Type | Description |
| --- | --- | --- |
| message | String | the notification message |
| data | Object | any custom data |
| oneSignalIds | Array | a list of OneSignal devices ids |
This project is under the MIT license.