/// <summary> /// Generate an authorization token that can be used to download files from a private bucket. /// </summary> /// <param name="bucketId">The buckete id the download authorization token will allow access.</param> /// <param name="fileNamePrefix">The file name prefix of files the download authorization token will allow access.</param> /// <param name="validDurationInSeconds">The number of seconds before the authorization token will expire.</param> /// <exception cref="AuthenticationException">Thrown when authentication fails.</exception> /// <exception cref="ApiException">Thrown when an error occurs during client operation.</exception> async Task <IApiResults <GetDownloadAuthorizationResponse> > IStorageFiles.GetDownloadTokenAsync (string bucketId, string fileNamePrefix, long validDurationInSeconds) { var request = new GetDownloadAuthorizationRequest(bucketId, fileNamePrefix, validDurationInSeconds); return(await _client.GetDownloadAuthorizationAsync(request, _cancellationToken)); }
/// <summary> /// Generate an authorization token that can be used to download files from a private bucket. /// </summary> /// <param name="request">The <see cref="GetDownloadAuthorizationRequest"/> to send.</param> /// <exception cref="AuthenticationException">Thrown when authentication fails.</exception> /// <exception cref="ApiException">Thrown when an error occurs during client operation.</exception> async Task <IApiResults <GetDownloadAuthorizationResponse> > IStorageFiles.GetDownloadTokenAsync (GetDownloadAuthorizationRequest request) { return(await _client.GetDownloadAuthorizationAsync(request, _cancellationToken)); }