Exemple #1
0
 public static Notification[] GetUnreadNotifications(bool Group = false, string TimeUpdated = "", int Limit = 0, int Offset = 0)
 {
     var getUnreadNotifications = new GetUnreadNotifications
     {
         Request = new GetUnreadNotificationsRequest
         {
             Pars = new GetUnreadNotificationsRequest.Params
             {
                 Group = Group,
                 Limit = Limit,
                 TimeUpdated = TimeUpdated,
                 Offset = Offset
             },
         }
     };
     var response = getUnreadNotifications.SendRequest();
     if (response.status.code == "ok")
     {
         return response.data.notifications;
     }
     else
     {
         throw new Exception("Что-то пошло не так при ответе с сервера: " + response.status.message);
     }
 }
Exemple #2
0
        public static Notification[] GetUnreadNotifications(bool Group = false, string TimeUpdated = "", int Limit = 0, int Offset = 0)
        {
            var getUnreadNotifications = new GetUnreadNotifications
            {
                Request = new GetUnreadNotificationsRequest
                {
                    Pars = new GetUnreadNotificationsRequest.Params
                    {
                        Group       = Group,
                        Limit       = Limit,
                        TimeUpdated = TimeUpdated,
                        Offset      = Offset
                    },
                }
            };
            var response = getUnreadNotifications.SendRequest();

            if (response.status.code == "ok")
            {
                return(response.data.notifications);
            }
            else
            {
                throw new Exception("Что-то пошло не так при ответе с сервера: " + response.status.message);
            }
        }