list method
Lists all the Photos that belong to the user.
> Note: Recently created photos that are still being indexed are not returned in the response.
Request parameters:
filter
- Optional. The filter expression. For example:
placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw
. The filters supported are:
placeId
, min_latitude
, max_latitude
, min_longitude
,
max_longitude
. See https://google.aip.dev/160 for more information.
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.
pageSize
- Optional. The maximum number of photos to return. pageSize
must be non-negative. If pageSize
is zero or is not provided, the
default page size of 100 is used. The number of photos returned in the
response may be less than pageSize
if the number of photos that belong
to the user is less than pageSize
.
pageToken
- Optional. The nextPageToken value returned from a previous
ListPhotos request, if any.
view
- Required. Specifies if a download URL for the photos bytes should
be returned in the Photos 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 ListPhotosResponse.
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<ListPhotosResponse> list({
core.String? filter,
core.String? languageCode,
core.int? pageSize,
core.String? pageToken,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (languageCode != null) 'languageCode': [languageCode],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/photos';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListPhotosResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}