1.0.3 • Published 6 years ago

onesignal-promise v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

OneSignal Promise SDK

A super simple promise-based node sdk for creating, canceling, and view notifications in OneSignal.

Super simple to use

const oneSignal = require('onesignal-promise')({ appId: 'APP_ID', apiKey: 'API_KEY' });
oneSignal.createNotification({ contents: {'en': 'Hello World'} })
	.then(res => {
		if (!res.errors) {
			console.log(res.id);
		}
	});

Installation

npm install --save onesignal-promise