list method
Retrieves a list of annotations, possibly filtered.
Request parameters:
contentVersion - The content version for the requested volume.
layerId - The layer ID to limit annotation by.
layerIds - The layer ID(s) to limit annotation by.
maxResults - Maximum number of results to return
Value must be between "0" and "40".
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.
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).
volumeId - The volume to restrict annotations to.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a Annotations.
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<Annotations> list({
core.String? contentVersion,
core.String? layerId,
core.List<core.String>? layerIds,
core.int? maxResults,
core.String? pageToken,
core.bool? showDeleted,
core.String? source,
core.String? updatedMax,
core.String? updatedMin,
core.String? volumeId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'contentVersion': ?contentVersion == null ? null : [contentVersion],
'layerId': ?layerId == null ? null : [layerId],
'layerIds': ?layerIds,
'maxResults': ?maxResults == null ? null : ['${maxResults}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'showDeleted': ?showDeleted == null ? null : ['${showDeleted}'],
'source': ?source == null ? null : [source],
'updatedMax': ?updatedMax == null ? null : [updatedMax],
'updatedMin': ?updatedMin == null ? null : [updatedMin],
'volumeId': ?volumeId == null ? null : [volumeId],
'fields': ?$fields == null ? null : [$fields],
};
const url_ = 'books/v1/mylibrary/annotations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Annotations.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}