This package has been deprecated

Author message:

move to @palmabit/onesignal-notification

onesignal-notification

0.0.2 • Public • Published

OneSignal Nodejs Notification api wrapper

Tests

This is an unofficial wrapper/client for the OneSignal notification API that runs on Node.JS. A list of selected wrappers for different languages and environments is available at the Developer site's Libraries page.

Installation

$ npm install onesignal-notification

Usage

const OnesignalNotificationApi = require('onesignal-notification')
const api = new OnesignalNotificationApi('MY-REST-KEY', 'APP-ID')

const message = {
  it: 'Some message',
  en: 'Some message'
}

api.sendToAll(message, null, (err, res) => {
  console.log(err)
  console.log(res)
})

API

sendToAll

const OnesignalNotificationApi = require('onesignal-notification')
const api = sendToAll(message, options, callback)

sendToSegment

//Coming Soon

sendToDevices

//Coming Soon

...

Test

npm test

Coverage

npm run coverage

Development

See something you think can be improved? Open an issue or clone the project and send a pull request with your changes.

Author

Palmabit

License

MIT license

Package Sidebar

Install

npm i onesignal-notification

Weekly Downloads

5

Version

0.0.2

License

MIT

Last publish

Collaborators

  • francesco