get method

Future<Volumeannotation> get(
  1. String volumeId,
  2. String layerId,
  3. String annotationId, {
  4. String? locale,
  5. String? source,
  6. String? $fields,
})

Gets the volume annotation.

Request parameters:

volumeId - The volume to retrieve annotations for.

layerId - The ID for the layer to get the annotations.

annotationId - The ID of the volume annotation to retrieve.

locale - The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.

source - String to identify the originator of this request.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Volumeannotation.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Volumeannotation> get(
  core.String volumeId,
  core.String layerId,
  core.String annotationId, {
  core.String? locale,
  core.String? source,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (locale != null) 'locale': [locale],
    if (source != null) 'source': [source],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'books/v1/volumes/' +
      commons.escapeVariable('$volumeId') +
      '/layers/' +
      commons.escapeVariable('$layerId') +
      '/annotations/' +
      commons.escapeVariable('$annotationId');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return Volumeannotation.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}