public async ValueTask <BungieResponse <GroupApplicationResponse> > IndividualGroupInvite( AuthorizationTokenData authorizationToken, long groupId, BungieMembershipType membershipType, long membershipId, GroupApplicationRequest request, CancellationToken cancellationToken = default) { if (!_configuration.HasSufficientRights(ApplicationScopes.AdminGroups)) { throw new InsufficientScopeException(ApplicationScopes.AdminGroups); } var url = StringBuilderPool.GetBuilder(cancellationToken) .Append("/GroupV2/") .AddUrlParam(groupId.ToString()) .Append("Members/IndividualInvite/") .AddUrlParam(((int)membershipType).ToString()) .AddUrlParam(membershipId.ToString()) .Build(); var stream = new MemoryStream(); await _serializer.SerializeAsync(stream, request); return(await _dotNetBungieApiHttpClient .PostToBungieNetPlatform <GroupApplicationResponse>(url, cancellationToken, stream, authorizationToken.AccessToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <EntityActionResult[]> > DenyAllPending( long groupId, GroupApplicationRequest request, CancellationToken token = default) { return(await _apiAccess.DenyAllPending(_token, groupId, request, token)); }
public async ValueTask <BungieResponse <bool> > ApprovePending( AuthorizationTokenData authData, long groupId, long membershipId, BungieMembershipType membershipType, GroupApplicationRequest request, CancellationToken token = default) { if (!_configuration.Settings.IdentificationSettings.ApplicationScopes .HasFlag(ApplicationScopes.AdminGroups)) { throw new InsufficientScopeException(ApplicationScopes.AdminGroups); } var url = StringBuilderPool.GetBuilder(token) .Append("/GroupV2/") .AddUrlParam(groupId.ToString()) .Append("Members/Approve/") .AddUrlParam(((int)membershipType).ToString()) .AddUrlParam(membershipId.ToString()) .Build(); var stream = new MemoryStream(); await _serializationHelper.SerializeAsync(stream, request); return(await _httpClient.PostToBungieNetPlatform <bool>(url, token, stream, authData.AccessToken)); }
public async ValueTask <BungieResponse <bool> > ApprovePending( long groupId, long membershipId, BungieMembershipType membershipType, GroupApplicationRequest request, CancellationToken token = default) { return(await _apiAccess.ApprovePending(_token, groupId, membershipId, membershipType, request, token)); }
public async ValueTask <BungieResponse <GroupApplicationResponse> > IndividualGroupInvite( long groupId, BungieMembershipType membershipType, long membershipId, GroupApplicationRequest request, CancellationToken token = default) { return(await _apiAccess.IndividualGroupInvite(_token, groupId, membershipType, membershipId, request, token)); }