Ejemplo n.º 1
0
        public void Delete(string notificationId)
        {
            var client  = new OneSignalClient(ApiKey);
            var options = new NotificationCancelOptions {
                Id = notificationId, AppId = AppId
            };

            client.Notifications.Cancel(options);
        }
Ejemplo n.º 2
0
        public static async Task <string> OneSignalCancelPushNotification(string id, string appId, string restKey)
        {
            var client = new OneSignalClient(restKey);
            var opt    = new NotificationCancelOptions()
            {
                AppId = appId,
                Id    = id
            };
            NotificationCancelResult result = await client.Notifications.CancelAsync(opt);

            return(result.Success);
        }