From 94025a7fd27266758d1e6109869a99d1e1a58113 Mon Sep 17 00:00:00 2001 From: guille Date: Sun, 22 Jan 2017 04:25:12 +0100 Subject: [PATCH] fix(plugin): adds subscribe() and unsubscribe() --- src/plugins/push.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/plugins/push.ts b/src/plugins/push.ts index 519506acf..ae1c24507 100644 --- a/src/plugins/push.ts +++ b/src/plugins/push.ts @@ -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 *