list method
Returns the search keywords used to find a business in search or maps.
Each search keyword is accompanied by impressions which are aggregated on
a monthly basis. Example request: GET https://businessprofileperformance.googleapis.com/v1/locations/12345/searchkeywords/impressions/monthly?monthly_range.start_month.year=2022&monthly_range.start_month.month=1&monthly_range.end_month.year=2022&monthly_range.end_month.month=3
Request parameters:
parent - Required. The location for which the time series should be
fetched. Format: locations/{location_id} where location_id is an
unobfuscated listing id.
Value must have pattern ^locations/\[^/\]+$.
monthlyRange_endMonth_day - Day of a month. Must be from 1 to 31 and
valid for the year and month, or 0 to specify a year by itself or a year
and month where the day isn't significant.
monthlyRange_endMonth_month - Month of a year. Must be from 1 to 12, or
0 to specify a year without a month and day.
monthlyRange_endMonth_year - Year of the date. Must be from 1 to 9999,
or 0 to specify a date without a year.
monthlyRange_startMonth_day - Day of a month. Must be from 1 to 31 and
valid for the year and month, or 0 to specify a year by itself or a year
and month where the day isn't significant.
monthlyRange_startMonth_month - Month of a year. Must be from 1 to 12,
or 0 to specify a year without a month and day.
monthlyRange_startMonth_year - Year of the date. Must be from 1 to 9999,
or 0 to specify a date without a year.
pageSize - Optional. The number of results requested. The default page
size is 100. Page size can be set to a maximum of 100.
pageToken - Optional. A token indicating the next paginated result to be
returned.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListSearchKeywordImpressionsMonthlyResponse.
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<ListSearchKeywordImpressionsMonthlyResponse> list(
core.String parent, {
core.int? monthlyRange_endMonth_day,
core.int? monthlyRange_endMonth_month,
core.int? monthlyRange_endMonth_year,
core.int? monthlyRange_startMonth_day,
core.int? monthlyRange_startMonth_month,
core.int? monthlyRange_startMonth_year,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'monthlyRange.endMonth.day': ?monthlyRange_endMonth_day == null
? null
: ['${monthlyRange_endMonth_day}'],
'monthlyRange.endMonth.month': ?monthlyRange_endMonth_month == null
? null
: ['${monthlyRange_endMonth_month}'],
'monthlyRange.endMonth.year': ?monthlyRange_endMonth_year == null
? null
: ['${monthlyRange_endMonth_year}'],
'monthlyRange.startMonth.day': ?monthlyRange_startMonth_day == null
? null
: ['${monthlyRange_startMonth_day}'],
'monthlyRange.startMonth.month': ?monthlyRange_startMonth_month == null
? null
: ['${monthlyRange_startMonth_month}'],
'monthlyRange.startMonth.year': ?monthlyRange_startMonth_year == null
? null
: ['${monthlyRange_startMonth_year}'],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' +
core.Uri.encodeFull('$parent') +
'/searchkeywords/impressions/monthly';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListSearchKeywordImpressionsMonthlyResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}