Easily send push notifications via OneSignal REST API.
$ meteor add astrocoders:one-signal
Ensure that you have a oneSignal entry in your settings.json:
{
"oneSignal": {
"apiKey": "YOUR_ONE_SIGNAL_API_KEY",
"appId": "YOUR_APP_ID"
},
}
Usage:
const data = {
contents: {
en: 'Hey! Wazup? We miss you.',
},
};
OneSignal.Notifications.create([playersId], data);
// => returns OneSignal response.
Every created notification is saved into SentNotifications collection.