summary method
Gets the summary of specified layers.
Request parameters:
layerIds
- Array of layer IDs to get the summary for.
volumeId
- Volume id to get the summary for.
source
- Optional. String to identify the originator of this request.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a AnnotationsSummary.
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<AnnotationsSummary> summary(
core.List<core.String> layerIds,
core.String volumeId, {
core.String? source,
core.String? $fields,
}) async {
if (layerIds.isEmpty) {
throw core.ArgumentError('Parameter layerIds cannot be empty.');
}
final queryParams_ = <core.String, core.List<core.String>>{
'layerIds': layerIds,
'volumeId': [volumeId],
if (source != null) 'source': [source],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'books/v1/mylibrary/annotations/summary';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return AnnotationsSummary.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}