batchGet method
Gets the metadata of the specified Photo batch.
Note that if BatchGetPhotos fails, either critical fields are missing or there is an authentication error. Even if BatchGetPhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for specific failures that can occur per photo.
Request parameters:
languageCode
- Optional. The BCP-47 language code, such as "en-US" or
"sr-Latn". For more information, see
http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If
language_code is unspecified, the user's language preference for Google
services is used.
photoIds
- Required. IDs of the Photos. For HTTP GET requests, the URL
query parameter should be photoIds=&photoIds=&...
.
view
- Required. Specifies if a download URL for the photo bytes should
be returned in the Photo response.
Possible string values are:
- "BASIC" : Server responses do not include the download URL for the photo bytes. The default value.
- "INCLUDE_DOWNLOAD_URL" : Server responses include the download URL for the photo bytes.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a BatchGetPhotosResponse.
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<BatchGetPhotosResponse> batchGet({
core.String? languageCode,
core.List<core.String>? photoIds,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (languageCode != null) 'languageCode': [languageCode],
if (photoIds != null) 'photoIds': photoIds,
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/photos:batchGet';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return BatchGetPhotosResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}