Example #1
0
        /// <inheritDoc/>
        public void NotifyAsync(string[] interests, string alertText, string alertTitle, string alertSubtitle, string webhook_url, WebhookLevel webhook_level, Action <INotifyResult> callback)
        {
            NotifyBody nb = new NotifyBody();

            nb.interests               = interests;
            nb.apns.aps.alert.body     = alertText;
            nb.webhook_url             = webhook_url;
            nb.webhook_level           = webhook_level.ToString();
            nb.apns.aps.alert.title    = alertTitle;
            nb.apns.aps.alert.subtitle = alertSubtitle;

            ExecuteNotifyAsync("/notifications", nb, baseResponse =>
            {
                if (callback != null)
                {
                    callback(new NotifyResult(baseResponse));
                }
            });
        }
Example #2
0
        /// <inheritDoc/>
        public INotifyResult Notify(string[] interests, Notification notification, string webhook_url, WebhookLevel webhook_level)
        {
            NotifyBody notifyBody = new NotifyBody();

            notifyBody.interests               = interests;
            notifyBody.apns.aps.notification   = notification;
            notifyBody.apns.aps.alert.body     = "New Message";
            notifyBody.apns.aps.alert.title    = notification.title;
            notifyBody.apns.aps.alert.subtitle = notification.subtitle;
            notifyBody.webhook_url             = webhook_url;
            notifyBody.webhook_level           = webhook_level.ToString();

            IRestResponse response = ExecuteNotify("/notifications", notifyBody);
            NotifyResult  result   = new NotifyResult(response);

            return(result);
        }
Example #3
0
 /// <inheritDoc/>
 public INotifyResult Notify(string interest, string alertText, string alertTitle, string alertSubtitle, string webhook_url, WebhookLevel webhook_level)
 {
     return(Notify(new string[] { interest }, alertText, alertTitle, alertSubtitle, webhook_url, webhook_level));
 }
Example #4
0
        /// <inheritDoc/>
        public INotifyResult Notify(string[] interests, string alertText, string alertTitle, string alertSubtitle, string webhook_url, WebhookLevel webhook_level)
        {
            NotifyBody nb = new NotifyBody();

            nb.interests               = interests;
            nb.apns.aps.alert.body     = alertText;
            nb.apns.aps.alert.title    = alertTitle;
            nb.apns.aps.alert.subtitle = alertSubtitle;
            nb.webhook_url             = webhook_url;
            nb.webhook_level           = webhook_level.ToString();

            IRestResponse response = ExecuteNotify("/notifications", nb);
            NotifyResult  result   = new NotifyResult(response);

            return(result);
        }