describeInputDeviceThumbnail method
Future<DescribeInputDeviceThumbnailResponse>
describeInputDeviceThumbnail({
- required AcceptHeader accept,
- required String inputDeviceId,
Get the latest thumbnail data for the input device.
May throw BadGatewayException.
May throw BadRequestException.
May throw ForbiddenException.
May throw GatewayTimeoutException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter accept :
The HTTP Accept header. Indicates the requested type for the thumbnail.
Parameter inputDeviceId :
The unique ID of this input device. For example, hd-123456789abcdef.
Implementation
Future<DescribeInputDeviceThumbnailResponse> describeInputDeviceThumbnail({
required AcceptHeader accept,
required String inputDeviceId,
}) async {
final headers = <String, String>{
'accept': accept.value,
};
final response = await _protocol.sendRaw(
payload: null,
method: 'GET',
requestUri:
'/prod/inputDevices/${Uri.encodeComponent(inputDeviceId)}/thumbnailData',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return DescribeInputDeviceThumbnailResponse(
body: await response.stream.toBytes(),
contentLength:
_s.extractHeaderIntValue(response.headers, 'Content-Length'),
contentType: _s
.extractHeaderStringValue(response.headers, 'Content-Type')
?.let(ContentType.fromString),
eTag: _s.extractHeaderStringValue(response.headers, 'ETag'),
lastModified:
_s.extractHeaderDateTimeValue(response.headers, 'Last-Modified'),
);
}