public async ValueTask <BungieResponse <TrendingCategories> > GetTrendingCategories( CancellationToken cancellationToken = default) { return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <TrendingCategories>("/Trending/Categories/", cancellationToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <Dictionary <string, string> > > GetAvailableLocales( CancellationToken cancellationToken = default) { return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <Dictionary <string, string> >("/GetAvailableLocales/", cancellationToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <Application[]> > GetBungieApplications( CancellationToken cancellationToken = default) { return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <Application[]>("/App/FirstParty/", cancellationToken) .ConfigureAwait(false)); }
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 cancellationToken = default) { var url = StringBuilderPool .GetBuilder(cancellationToken) .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.AsString()))) .Build(); return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <PostSearchResponse>(url, cancellationToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <ContentTypeDescription> > GetContentType( string type, CancellationToken cancellationToken = default) { var url = StringBuilderPool .GetBuilder(cancellationToken) .Append("/Content/GetContentType/") .AddUrlParam(type) .Build(); return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <ContentTypeDescription>(url, cancellationToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <BungieFriendListResponse> > GetFriendList( AuthorizationTokenData authorizationToken, CancellationToken cancellationToken = default) { if (!_configuration.HasSufficientRights(ApplicationScopes.ReadUserData)) { throw new InsufficientScopeException(ApplicationScopes.ReadUserData); } return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <BungieFriendListResponse>( "/Social/Friends/", cancellationToken, authorizationToken.AccessToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <PartnerOfferSkuHistoryResponse[]> > GetPartnerOfferSkuHistory( AuthorizationTokenData authorizationToken, int partnerApplicationId, long targetBnetMembershipId, CancellationToken cancellationToken = default) { if (!_configuration.HasSufficientRights(ApplicationScopes.PartnerOfferGrant)) { throw new InsufficientScopeException(ApplicationScopes.PartnerOfferGrant); } var url = StringBuilderPool .GetBuilder(cancellationToken) .Append("/Tokens/Partner/History/") .AddUrlParam(partnerApplicationId.ToString()) .AddUrlParam(targetBnetMembershipId.ToString()) .Build(); return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <PartnerOfferSkuHistoryResponse[]>( url, cancellationToken, authorizationToken.AccessToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <int> > GetActivePrivateClanFireteamCount( AuthorizationTokenData authorizationToken, long groupId, CancellationToken cancellationToken = default) { if (!_configuration.HasSufficientRights(ApplicationScopes.ReadGroups)) { throw new InsufficientScopeException(ApplicationScopes.ReadGroups); } var url = StringBuilderPool .GetBuilder(cancellationToken) .Append("/Fireteam/Clan/") .AddUrlParam(groupId.ToString()) .Append("ActiveCount/") .Build(); return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <int>(url, cancellationToken, authorizationToken.AccessToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <GeneralUser> > GetBungieNetUserById( long id, CancellationToken cancellationToken = default) { var url = StringBuilderPool .GetBuilder(cancellationToken) .Append("/User/GetBungieNetUserById/") .AddUrlParam(id.ToString()) .Build(); return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <GeneralUser>(url, cancellationToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <PostSearchResponse> > GetCommunityContent( ForumTopicsSortEnum sort, ForumMediaType mediaFilter, int page = 0, CancellationToken cancellationToken = default) { var url = StringBuilderPool .GetBuilder(cancellationToken) .Append("/CommunityContent/Get/") .AddUrlParam(((byte)sort).ToString()) .AddUrlParam(((int)mediaFilter).ToString()) .AddUrlParam(page.ToString()) .Build(); return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <PostSearchResponse>(url, cancellationToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <DestinyManifest> > GetDestinyManifest( CancellationToken cancellationToken = default) { return(await _dotNetBungieApiHttpClient .GetFromBungieNetPlatform <DestinyManifest>("/Destiny2/Manifest/", cancellationToken) .ConfigureAwait(false)); }