Exemple #1
0
        public async Task <GetTopicsResponse> GetTopics(
            RequestingUser u,
            IEnumerable <Tag> tags = null,
            int?page    = null,
            int?groupId = null,
            bool asUser = false,
            ForumTopicsCategoryFilters category = ForumTopicsCategoryFilters.None,
            ForumTopicsSort sort      = ForumTopicsSort.Latest,
            ForumTopicsQuickDate date = ForumTopicsQuickDate.LastYear,
            int itemsPerPage          = BungieNet.ForumItemsPerPage
            )
        {
            string path = string.Format(
                "/Forum/GetTopicsPaged/{0}/{1}/{2}/{3}/{4}/{5}/?lc=en&tagstring={6}",
                page ?? 0,
                itemsPerPage,
                groupId ?? 0,
                (int)sort,
                (int)date,
                (int)category,
                tags != null ? HttpUtility.UrlEncode(string.Join(",", tags)) : ""
                );

            JObject j = await NoAuthRequest(path, u);

            return(new GetTopicsResponse(j));
        }
		public async Task<GetTopicsResponse> GetTopics(
			RequestingUser u,
			IEnumerable<Tag> tags = null,
			int? page = null,
			int? groupId = null,
			bool asUser = false,
			ForumTopicsCategoryFilters category = ForumTopicsCategoryFilters.None,
			ForumTopicsSort sort = ForumTopicsSort.Latest,
			ForumTopicsQuickDate date = ForumTopicsQuickDate.LastYear,
			int itemsPerPage = BungieNet.ForumItemsPerPage
			) {

				string path = string.Format(
					"/Forum/GetTopicsPaged/{0}/{1}/{2}/{3}/{4}/{5}/?lc=en&tagstring={6}",
					page ?? 0,
					itemsPerPage,
					groupId ?? 0,
					(int)sort,
					(int)date,
					(int)category,
					tags != null ? HttpUtility.UrlEncode(string.Join(",", tags)) : ""
				);

				JObject j = await NoAuthRequest(path, u);
				return new GetTopicsResponse(j);

		}