list method

Future<Volumeannotations> list(
  1. String volumeId,
  2. String layerId,
  3. String contentVersion, {
  4. String? endOffset,
  5. String? endPosition,
  6. String? locale,
  7. int? maxResults,
  8. String? pageToken,
  9. bool? showDeleted,
  10. String? source,
  11. String? startOffset,
  12. String? startPosition,
  13. String? updatedMax,
  14. String? updatedMin,
  15. String? volumeAnnotationsVersion,
  16. String? $fields,
})

Gets the volume annotations for a volume and layer.

Request parameters:

volumeId - The volume to retrieve annotations for.

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

contentVersion - The content version for the requested volume.

endOffset - The end offset to end retrieving data from.

endPosition - The end position to end retrieving data from.

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

maxResults - Maximum number of results to return Value must be between "0" and "200".

pageToken - The value of the nextToken from the previous page.

showDeleted - Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.

source - String to identify the originator of this request.

startOffset - The start offset to start retrieving data from.

startPosition - The start position to start retrieving data from.

updatedMax - RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).

updatedMin - RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).

volumeAnnotationsVersion - The version of the volume annotations that you are requesting.

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

Completes with a Volumeannotations.

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<Volumeannotations> list(
  core.String volumeId,
  core.String layerId,
  core.String contentVersion, {
  core.String? endOffset,
  core.String? endPosition,
  core.String? locale,
  core.int? maxResults,
  core.String? pageToken,
  core.bool? showDeleted,
  core.String? source,
  core.String? startOffset,
  core.String? startPosition,
  core.String? updatedMax,
  core.String? updatedMin,
  core.String? volumeAnnotationsVersion,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'contentVersion': [contentVersion],
    'endOffset': ?endOffset == null ? null : [endOffset],
    'endPosition': ?endPosition == null ? null : [endPosition],
    'locale': ?locale == null ? null : [locale],
    'maxResults': ?maxResults == null ? null : ['${maxResults}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'showDeleted': ?showDeleted == null ? null : ['${showDeleted}'],
    'source': ?source == null ? null : [source],
    'startOffset': ?startOffset == null ? null : [startOffset],
    'startPosition': ?startPosition == null ? null : [startPosition],
    'updatedMax': ?updatedMax == null ? null : [updatedMax],
    'updatedMin': ?updatedMin == null ? null : [updatedMin],
    'volumeAnnotationsVersion': ?volumeAnnotationsVersion == null
        ? null
        : [volumeAnnotationsVersion],
    'fields': ?$fields == null ? null : [$fields],
  };

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

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