list method
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>>{
'contentVersion': ?contentVersion == null ? null : [contentVersion],
'maxResults': ?maxResults == null ? null : ['${maxResults}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'source': ?source == null ? null : [source],
'fields': ?$fields == null ? null : [$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>,
);
}