public async ValueTask <BungieResponse <PostSearchResponse> > GetTopicsPaged( ForumPostCategoryEnums categoryFilter, ForumTopicsQuickDateEnum quickDate, ForumTopicsSortEnum sort, long group, int pageSize = 0, int page = 0, string tagstring = null, BungieLocales[] locales = null, CancellationToken token = default) { var url = StringBuilderPool .GetBuilder(token) .Append("/Forum/GetTopicsPaged/") .AddUrlParam(page.ToString()) .AddUrlParam(pageSize.ToString()) .AddUrlParam(group.ToString()) .AddUrlParam(((byte)sort).ToString()) .AddUrlParam(((int)quickDate).ToString()) .AddUrlParam(((int)categoryFilter).ToString()) .AddQueryParam("tagstring", tagstring, () => string.IsNullOrWhiteSpace(tagstring)) .AddQueryParam("locales", string.Join(",", locales.Select(x => x.LocaleToString()))) .Build(); return(await _httpClient.GetFromBungieNetPlatform <PostSearchResponse>(url, token)); }
public async ValueTask <BungieResponse <ContentTypeDescription> > GetContentType( string type, CancellationToken token = default) { var url = StringBuilderPool .GetBuilder(token) .Append("/Content/GetContentType/") .AddUrlParam(type) .Build(); return(await _httpClient.GetFromBungieNetPlatform <ContentTypeDescription>(url, token)); }
public async ValueTask <BungieResponse <int> > GetActivePrivateClanFireteamCount( AuthorizationTokenData authData, long groupId, CancellationToken token = default) { if (!_configuration.Settings.IdentificationSettings.ApplicationScopes.HasFlag(ApplicationScopes.ReadGroups)) { throw new InsufficientScopeException(ApplicationScopes.ReadGroups); } var url = StringBuilderPool .GetBuilder(token) .Append("/Fireteam/Clan/") .AddUrlParam(groupId.ToString()) .Append("ActiveCount/") .Build(); return(await _httpClient.GetFromBungieNetPlatform <int>(url, token, authData.AccessToken)); }
public async ValueTask <BungieResponse <GeneralUser> > GetBungieNetUserById( long id, CancellationToken token = default) { var url = StringBuilderPool .GetBuilder(token) .Append("/User/GetBungieNetUserById/") .AddUrlParam(id.ToString()) .Build(); return(await _httpClient.GetFromBungieNetPlatform <GeneralUser>(url, token)); }
public async ValueTask <BungieResponse <PostSearchResponse> > GetCommunityContent( ForumTopicsSortEnum sort, ForumMediaType mediaFilter, int page = 0, CancellationToken token = default) { var url = StringBuilderPool .GetBuilder(token) .Append("/CommunityContent/Get/") .AddUrlParam(((byte)sort).ToString()) .AddUrlParam(((int)mediaFilter).ToString()) .AddUrlParam(page.ToString()) .Build(); return(await _httpClient.GetFromBungieNetPlatform <PostSearchResponse>(url, token)); }
public async ValueTask <BungieResponse <PartnerOfferSkuHistoryResponse[]> > GetPartnerOfferSkuHistory( AuthorizationTokenData authData, int partnerApplicationId, long targetBnetMembershipId, CancellationToken token = default) { if (!_configuration.Settings.IdentificationSettings.ApplicationScopes.HasFlag(ApplicationScopes .PartnerOfferGrant)) { throw new InsufficientScopeException(ApplicationScopes.PartnerOfferGrant); } var url = StringBuilderPool .GetBuilder(token) .Append("/Tokens/Partner/History/") .AddUrlParam(partnerApplicationId.ToString()) .AddUrlParam(targetBnetMembershipId.ToString()) .Build(); return(await _httpClient.GetFromBungieNetPlatform <PartnerOfferSkuHistoryResponse[]>(url, token, authData.AccessToken)); }
public async ValueTask <BungieResponse <DestinyManifest> > GetDestinyManifest( CancellationToken token = default) { return(await _httpClient.GetFromBungieNetPlatform <DestinyManifest>("/Destiny2/Manifest/", token)); }
public async ValueTask <BungieResponse <TrendingCategories> > GetTrendingCategories( CancellationToken token = default) { return(await _httpClient.GetFromBungieNetPlatform <TrendingCategories>("/Trending/Categories/", token)); }
public async ValueTask <BungieResponse <Dictionary <string, string> > > GetAvailableLocales( CancellationToken token = default) { return(await _httpClient.GetFromBungieNetPlatform <Dictionary <string, string> >("/GetAvailableLocales/", token)); }
public async ValueTask <BungieResponse <Application[]> > GetBungieApplications( CancellationToken token = default) { return(await _httpClient.GetFromBungieNetPlatform <Application[]>("/App/FirstParty/", token)); }