Пример #1
0
        public static string SendPushNotification(int templateId, int contactId, Dictionary <string, Object> information = null)
        {
            PushNotificationDistribution messageDistribution = new PushNotificationDistribution()
            {
                Template = new Template {
                    Id = templateId
                },
                To = new List <IContact>()
                {
                    new Contact()
                    {
                        Id = contactId
                    }
                }
            };

            return(SendMessage(messageDistribution));
        }
Пример #2
0
        public static string SendPushNotification(int templateId, string token, OperationSystem os, Dictionary <string, Object> information = null)
        {
            PushNotificationDistribution messageDistribution = new PushNotificationDistribution()
            {
                Template = new Template {
                    Id = templateId
                },
                To = new List <IContact>()
                {
                    new Contact()
                    {
                        Token = token, OS = os, Info = information
                    }
                }
            };

            return(SendMessage(messageDistribution));
        }