https://github.com/pradel/meteor-ionic-push
Ionic push for meteor
https://github.com/pradel/meteor-ionic-push
Last synced: over 1 year ago
JSON representation
Ionic push for meteor
- Host: GitHub
- URL: https://github.com/pradel/meteor-ionic-push
- Owner: pradel
- Created: 2016-01-14T18:04:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-15T19:19:58.000Z (over 10 years ago)
- Last Synced: 2025-02-01T22:43:57.015Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ionic Push for Meteor
Meteor package for sending push notifications via [ionic push](http://docs.ionic.io/docs/push-quick-start)
## Installation
meteor add leopradel:meteor-ionic-push
## Example
// Config Ionic Push service
Meteor.startup(function() {
IonicPush.config('your_ionic_app_id', 'your_ionic_app_secret');
});
// Send notification in method
Meteor.methods({
sendMessage: function (message) {
// Notify your users a new message is in chat
var my_users_token = ... // Get an array of your users device tokens
IonicPush.send({
'tokens': my_users_token,
'notification': {
'alert': message
}
});
}
});
## API
* `config(app_id, app_secret)`
Configure IonicPush package
* `send(params)`
Send a new push notification to ionic
* `checkPushStatus(message_id)`
Check the status of a queued push notification