mediaThumbnailGet method

Future<Uint8List> mediaThumbnailGet(
  1. String uuid, {
  2. int? quality,
})
inherited

mediaThumbnailGet -> /v1/media/{uuid}/thumbnail

Requests a thumbnail image of the specified media item at the given quality value.

PARAMETERS

uuid : The UUID of the item to look up.

  • Example (uuid): 3C39C433-5C18-4F51-B357-55BB870227C4

quality : The desired quality of the thumbnail. The value is the number of pixels in the largest dimension of the image, i.e. if the image is landscape (wider than it is tall), it is the width of the image. If the image is portrait (taller than it is wide), it is the height of the image.

Example: 400

RESPONSE 200:

The request was processed successfully.

content-type: image/jpeg

schema:

{
  "type": "string",
  "required": [],
  "format": "binary",
  "example": "image data here"
}

Implementation

Future<Uint8List> mediaThumbnailGet(String uuid, {int? quality}) async {
  String url = '/v1/media/$uuid/thumbnail';
  Map<String, dynamic> query = {'quality': quality.toString()};

  return await call('get', url, params: query, httpAccept: 'image/jpeg');
}