Task <Forum.PostSearchResponse> IForumClient.GetCoreTopicsPagedAsync(int page, Forum.ForumTopicsSortEnum sort, Forum.ForumTopicsQuickDateEnum quickDate, Forum.ForumTopicsCategoryFiltersEnum categoryFilter, string locales)
        {
            string[] pathSegments = new string[] { "Forum", "GetCoreTopicsPaged", page.ToString(), ((byte)sort).ToString(), ((int)quickDate).ToString(), ((int)categoryFilter).ToString() };
            System.Collections.Generic.List <QueryStringItem> queryItems = new System.Collections.Generic.List <QueryStringItem>()
            {
                new QueryStringItem("locales", (locales ?? ""))
            };
            Uri uri = GetEndpointUri(pathSegments, true, queryItems);

            return(GetEntityAsync <Forum.PostSearchResponse>(uri));
        }
 Forum.PostSearchResponse IForumClient.GetTopicsPaged(int page, int pageSize, long group, Forum.ForumTopicsSortEnum sort, Forum.ForumTopicsQuickDateEnum quickDate, Forum.ForumTopicsCategoryFiltersEnum categoryFilter, string locales, string tagstring) => Forum.GetTopicsPagedAsync(page, pageSize, group, sort, quickDate, categoryFilter, locales, tagstring).GetAwaiter().GetResult();
 Forum.PostSearchResponse IForumClient.GetCoreTopicsPaged(int page, Forum.ForumTopicsSortEnum sort, Forum.ForumTopicsQuickDateEnum quickDate, Forum.ForumTopicsCategoryFiltersEnum categoryFilter, string locales) => Forum.GetCoreTopicsPagedAsync(page, sort, quickDate, categoryFilter, locales).GetAwaiter().GetResult();
Example #4
0
        public dynamic GetTopicsPaged(Forum.ForumTopicsCategoryFiltersEnum categoryFilter, int group, string locales, int page, int pageSize, Forum.ForumTopicsQuickDateEnum quickDate, Forum.ForumTopicsSortEnum sort, string tagstring)
        {
            RestClient _client = new RestClient("http://www.bungie.net/d1/Platform/Destiny");
            var        request = new RestRequest($"/Forum/GetTopicsPaged/{page}/{pageSize}/{group}/{sort}/{quickDate}/{categoryFilter}/");

            request.AddHeader("X-API-KEY", APIKey);
            request.AddParameter("categoryFilter", categoryFilter);
            request.AddParameter("group", group);
            request.AddParameter("locales", locales);
            request.AddParameter("page", page);
            request.AddParameter("pageSize", pageSize);
            request.AddParameter("quickDate", quickDate);
            request.AddParameter("sort", sort);
            request.AddParameter("tagstring", tagstring);
            var     response             = _client.Execute(request);
            dynamic deserializedResponse = JsonConvert.DeserializeObject <dynamic>(response.Content);

            return(deserializedResponse);
        }