Skip to content

Basic Meteor and OneSignal integration. If you would like to contribute send us your PR!

License

Notifications You must be signed in to change notification settings

Astrocoders/meteor-one-signal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meteor-onesignal

Easily send push notifications via OneSignal REST API.

Installing

$ meteor add astrocoders:one-signal

Getting started

Ensure that you have a oneSignal entry in your settings.json:

{
  "oneSignal": {
    "apiKey": "YOUR_ONE_SIGNAL_API_KEY",    
    "appId": "YOUR_APP_ID"
  },  
}

Basic API

OneSignal.Notifications.create

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.

That's it for now, more coming.

Sent us a PR if you'd like to complete this API!

About

Basic Meteor and OneSignal integration. If you would like to contribute send us your PR!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published