public async Task<Stream> GetThumbnailAsync(string id, int? minHeight = null, int? minWidth = null, int? maxHeight = null, int? maxWidth = null, bool throttle = true, bool handleRetry = true)
{
id.ThrowIfNullOrWhiteSpace("id");
BoxRequest request = new BoxRequest(_config.FilesEndpointUri, string.Format(Constants.ThumbnailPathString, id))
.Param("min_height", minHeight.ToString())
.Param("min_width", minWidth.ToString())
.Param("max_height", maxHeight.ToString())
.Param("max_width", maxWidth.ToString());
IBoxResponse<Stream> response = await ToResponseAsync<Stream>(request, throttle).ConfigureAwait(false);
while (response.StatusCode == HttpStatusCode.Accepted && handleRetry)
{
await CrossPlatform.Delay(GetTimeDelay(response.Headers));
response = await ToResponseAsync<Stream>(request, throttle).ConfigureAwait(false);
}
return response.ResponseObject;
}