list method
- String accountId,
- String endDateTime,
- String startDateTime,
- {int maxResults,
- String pageToken,
- String $fields}
Retrieves the authenticated user's list of performance metrics.
Request parameters:
accountId
- The account id to get the reports.
endDateTime
- The end time of the report in ISO 8601 timestamp format
using UTC.
startDateTime
- The start time of the report in ISO 8601 timestamp
format using UTC.
maxResults
- Maximum number of entries returned on one result page. If
not set, the default is 100. Optional.
Value must be between "1" and "1000".
pageToken
- A continuation token, used to page through performance
reports. To retrieve the next page, set this parameter to the value of
"nextPageToken" from the previous response. Optional.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a PerformanceReportList.
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<PerformanceReportList> list(
core.String accountId, core.String endDateTime, core.String startDateTime,
{core.int maxResults, core.String pageToken, core.String $fields}) {
var _url;
var _queryParams = new core.Map<core.String, core.List<core.String>>();
var _uploadMedia;
var _uploadOptions;
var _downloadOptions = commons.DownloadOptions.Metadata;
var _body;
if (accountId == null) {
throw new core.ArgumentError("Parameter accountId is required.");
}
_queryParams["accountId"] = [accountId];
if (endDateTime == null) {
throw new core.ArgumentError("Parameter endDateTime is required.");
}
_queryParams["endDateTime"] = [endDateTime];
if (startDateTime == null) {
throw new core.ArgumentError("Parameter startDateTime is required.");
}
_queryParams["startDateTime"] = [startDateTime];
if (maxResults != null) {
_queryParams["maxResults"] = ["${maxResults}"];
}
if (pageToken != null) {
_queryParams["pageToken"] = [pageToken];
}
if ($fields != null) {
_queryParams["fields"] = [$fields];
}
_url = 'performancereport';
var _response = _requester.request(_url, "GET",
body: _body,
queryParams: _queryParams,
uploadOptions: _uploadOptions,
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions);
return _response.then((data) => new PerformanceReportList.fromJson(data));
}