public async ValueTask <BungieResponse <int> > PullFromPostmaster( DestinyPostmasterTransferRequest request, AuthorizationTokenData authData, CancellationToken token = default) { if (!_configuration.Settings.IdentificationSettings.ApplicationScopes .HasFlag(ApplicationScopes.MoveEquipDestinyItems)) { throw new InsufficientScopeException(ApplicationScopes.MoveEquipDestinyItems); } var stream = new MemoryStream(); await _serializationHelper.SerializeAsync(stream, request); return(await _httpClient.PostToBungieNetPlatform <int>("/Destiny2/Actions/Items/PullFromPostmaster/", token, stream, authData.AccessToken)); }
public async ValueTask <BungieResponse <int> > PullFromPostmaster( DestinyPostmasterTransferRequest request, AuthorizationTokenData authorizationToken, CancellationToken cancellationToken = default) { if (!_configuration.HasSufficientRights(ApplicationScopes.MoveEquipDestinyItems)) { throw new InsufficientScopeException(ApplicationScopes.MoveEquipDestinyItems); } var stream = new MemoryStream(); await _serializer.SerializeAsync(stream, request); return(await _dotNetBungieApiHttpClient .PostToBungieNetPlatform <int>("/Destiny2/Actions/Items/PullFromPostmaster/", cancellationToken, stream, authorizationToken.AccessToken) .ConfigureAwait(false)); }
public async ValueTask <BungieResponse <int> > PullFromPostmaster( DestinyPostmasterTransferRequest request, CancellationToken token = default) { return(await _apiAccess.PullFromPostmaster(request, _token, token)); }