getThumbnail method

Future<DynamiteResponse<Uint8List, void>> getThumbnail({
  1. required int x,
  2. required int y,
  3. required String file,
})

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:

  • x Width of the thumbnail.
  • y Height of the thumbnail.
  • file URL-encoded filename.

Status codes:

  • 200: Thumbnail returned
  • 400: Getting thumbnail is not possible
  • 404: File not found

See:

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 _response = await _rootClient.httpClient.send(_request);

  final _serializer = $getThumbnail_Serializer();
  final _rawResponse = await _i1.ResponseConverter<Uint8List, void>(_serializer).convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}