getThumbnail method
Gets a thumbnail of the specified file.
Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers.
Throws a DynamiteApiException if the API call does not return an expected status code.
Parameters:
xWidth of the thumbnail.yHeight of the thumbnail.fileURL-encoded filename.
Status codes:
- 200: Thumbnail returned
- 400: Getting thumbnail is not possible
- 404: File not found
See:
- $getThumbnail_Request for the request send by this method.
- $getThumbnail_Serializer for a converter to parse the
Responsefrom an executed request.
Implementation
Future<_i1.DynamiteResponse<Uint8List, void>> getThumbnail({
required int x,
required int y,
required String file,
}) async {
final _request = $getThumbnail_Request(
x: x,
y: y,
file: file,
);
final _streamedResponse = await _rootClient.httpClient.send(_request);
final _response = await _i3.Response.fromStream(_streamedResponse);
final _serializer = $getThumbnail_Serializer();
return _i1.ResponseConverter<Uint8List, void>(_serializer).convert(_response);
}