get method
Gets the annotation data.
Request parameters:
volumeId - The volume to retrieve annotations for.
layerId - The ID for the layer to get the annotations.
annotationDataId - The ID of the annotation data to retrieve.
contentVersion - The content version for the volume you are trying to
retrieve.
allowWebDefinitions - For the dictionary layer. Whether or not to allow
web definitions.
h - The requested pixel height for any images. If height is provided
width must also be provided.
locale - The locale information for the data. ISO-639-1 language and
ISO-3166-1 country code. Ex: 'en_US'.
scale - The requested scale for the image.
source - String to identify the originator of this request.
w - The requested pixel width for any images. If width is provided
height must also be provided.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a DictionaryAnnotationdata.
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<DictionaryAnnotationdata> get(
core.String volumeId,
core.String layerId,
core.String annotationDataId,
core.String contentVersion, {
core.bool? allowWebDefinitions,
core.int? h,
core.String? locale,
core.int? scale,
core.String? source,
core.int? w,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'contentVersion': [contentVersion],
'allowWebDefinitions': ?allowWebDefinitions == null
? null
: ['${allowWebDefinitions}'],
'h': ?h == null ? null : ['${h}'],
'locale': ?locale == null ? null : [locale],
'scale': ?scale == null ? null : ['${scale}'],
'source': ?source == null ? null : [source],
'w': ?w == null ? null : ['${w}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'books/v1/volumes/' +
commons.escapeVariable('$volumeId') +
'/layers/' +
commons.escapeVariable('$layerId') +
'/data/' +
commons.escapeVariable('$annotationDataId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return DictionaryAnnotationdata.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}