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>>{
if (contentVersion != null) 'contentVersion': [contentVersion],
if (layerId != null) 'layerId': [layerId],
if (layerIds != null) 'layerIds': layerIds,
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (pageToken != null) 'pageToken': [pageToken],
if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
if (source != null) 'source': [source],
if (updatedMax != null) 'updatedMax': [updatedMax],
if (updatedMin != null) 'updatedMin': [updatedMin],
if (volumeId != null) 'volumeId': [volumeId],
if ($fields != null) 'fields': [$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>);
}