get method
Get the # of search sessions, % of successful sessions with a click query statistics for search application.
Note: This API requires a standard end user account to execute.
Request parameters:
name - The resource id of the search application session stats, in the
following format: searchapplications/{application_id}
Value must have pattern ^searchapplications/\[^/\]+$.
fromDate_day - Day of month. Must be from 1 to 31 and valid for the year
and month.
fromDate_month - Month of date. Must be from 1 to 12.
fromDate_year - Year of date. Must be from 1 to 9999.
toDate_day - Day of month. Must be from 1 to 31 and valid for the year
and month.
toDate_month - Month of date. Must be from 1 to 12.
toDate_year - Year of date. Must be from 1 to 9999.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a GetSearchApplicationSessionStatsResponse.
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<GetSearchApplicationSessionStatsResponse> get(
core.String name, {
core.int? fromDate_day,
core.int? fromDate_month,
core.int? fromDate_year,
core.int? toDate_day,
core.int? toDate_month,
core.int? toDate_year,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fromDate.day': ?fromDate_day == null ? null : ['${fromDate_day}'],
'fromDate.month': ?fromDate_month == null ? null : ['${fromDate_month}'],
'fromDate.year': ?fromDate_year == null ? null : ['${fromDate_year}'],
'toDate.day': ?toDate_day == null ? null : ['${toDate_day}'],
'toDate.month': ?toDate_month == null ? null : ['${toDate_month}'],
'toDate.year': ?toDate_year == null ? null : ['${toDate_year}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/stats/session/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GetSearchApplicationSessionStatsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}