private GroBootResponseContent GetResponse2(string url, GroBootRequestContent requestContent)
        {
            HttpWebRequest         request         = GetRequest(url, requestContent);
            GroBootResponseContent grobootResponse = GetResponse(request);

            return(grobootResponse);
        }
        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;
        }
        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());
        }
        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);
        }