fix(plugin): adds subscribe() and unsubscribe()

This commit is contained in:
guille 2017-01-22 04:25:12 +01:00 committed by Ibby Hadeed
parent 8c021bcaa0
commit 94025a7fd2

View File

@ -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
*