예제 #1
0
        private GroBootResponseContent GetResponse2(string url, GroBootRequestContent requestContent)
        {
            HttpWebRequest         request         = GetRequest(url, requestContent);
            GroBootResponseContent grobootResponse = GetResponse(request);

            return(grobootResponse);
        }
예제 #2
0
        public void SetMessagesForBookmark(string accessKey, int bookmarkId, int[] messages)
        {
            string url = apibaseUrl + apiSetMessagesForBookmark;
            GroBootRequestContent requestContent = new GroBootRequestContent {
                SecretToken = accessKey, BookmarkId = bookmarkId, Messages = messages
            };
            GroBootResponseContent grobootResponse = GetResponse2(url, requestContent);

            // return grobootResponse.Data.Messages.Keys;
        }
예제 #3
0
        public List <int> GetBookmarkMessages(string accessKey, int bookmarkId, Diagnostics.ILogger Logger)
        {
            string url = apibaseUrl + apiGetBookmarkMessages;
            GroBootRequestContent requestContent = new GroBootRequestContent {
                SecretToken = accessKey, BookmarkId = bookmarkId
            };
            GroBootResponseContent grobootResponse = GetResponse2(url, requestContent);

            if (grobootResponse.Data == null || grobootResponse.Data.Messages == null)
            {
                Logger.Log("Home", "GetSelectedGrobootNotificationMessages", "GetBookmarkMessages", null, 1, grobootResponse.Code + ":" + grobootResponse.Message);
                return(null);
            }

            return(grobootResponse.Data.Messages.Select(r => r.Id).ToList());
        }
예제 #4
0
        public List <Message> GetAvailableMessages(string accessKey, Diagnostics.ILogger Logger)
        {
            string url = apibaseUrl + apiGetAvailableMessages;
            GroBootRequestContent requestContent = new GroBootRequestContent {
                SecretToken = accessKey
            };
            GroBootResponseContent grobootResponse = GetResponse2(url, requestContent);

            if (grobootResponse.Data == null || grobootResponse.Data.Messages == null)
            {
                Logger.Log("Home", "GetAvailableGrobootNotificationMessages", "GetAvailableMessages", null, 1, grobootResponse.Code + ":" + grobootResponse.Message);
                return(null);
            }

            return(grobootResponse.Data.Messages);
        }