get method
Gets the layer summary for a volume.
Request parameters:
volumeId - The volume to retrieve layers for.
summaryId - The ID for the layer to get the summary for.
contentVersion - The content version for the requested volume.
source - String to identify the originator of this request.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a Layersummary.
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<Layersummary> get(
core.String volumeId,
core.String summaryId, {
core.String? contentVersion,
core.String? source,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'contentVersion': ?contentVersion == null ? null : [contentVersion],
'source': ?source == null ? null : [source],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'books/v1/volumes/' +
commons.escapeVariable('$volumeId') +
'/layersummary/' +
commons.escapeVariable('$summaryId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Layersummary.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}