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:
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:
- getThumbnailRaw for an experimental operation that returns a DynamiteRawResponse that can be serialized.
Implementation
Future<DynamiteResponse<Uint8List, void>> getThumbnail({
required int x,
required int y,
required String file,
}) async {
final rawResponse = getThumbnailRaw(
x: x,
y: y,
file: file,
);
return rawResponse.future;
}