Skip to content

Commit

Permalink
fix(plugin): adds subscribe() and unsubscribe()
Browse files Browse the repository at this point in the history
  • Loading branch information
guillenotfound authored and ihadeed committed Jan 22, 2017
1 parent 8c021bc commit 94025a7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/plugins/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,23 @@ export interface PushNotification {
*/
unregister(successHandler: () => any, errorHandler?: () => any): void;

/**
* The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
* @param {string} topic: Topic to subscribe to.
* @param successHandler
* @param errorHandler
*/
subscribe(topic: string, successHandler: () => any, errorHandler?: () => any): void;

/**
* The unsubscribe method is used when the application no longer wants to receive push notifications
* from a specific topic but continue to receive other push messages.
* @param {string} topic: Topic to subscribe to.
* @param successHandler
* @param errorHandler
*/
unsubscribe(topic: string, successHandler: () => any, errorHandler?: () => any): void;

/**
* iOS & android only
*
Expand Down

0 comments on commit 94025a7

Please sign in to comment.