list method

Future<Layersummaries> list(
  1. String volumeId, {
  2. String? contentVersion,
  3. int? maxResults,
  4. String? pageToken,
  5. String? source,
  6. String? $fields,
})

List the layer summaries for a volume.

Request parameters:

volumeId - The volume to retrieve layers for.

contentVersion - The content version for the requested volume.

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

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

source - String to identify the originator of this request.

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

Completes with a Layersummaries.

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<Layersummaries> list(
  core.String volumeId, {
  core.String? contentVersion,
  core.int? maxResults,
  core.String? pageToken,
  core.String? source,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (contentVersion != null) 'contentVersion': [contentVersion],
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (source != null) 'source': [source],
    if ($fields != null) 'fields': [$fields],
  };

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

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