list method

Future<ListReportsResponse> list(
  1. String parent, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. int? skip,
  7. String? $fields,
})

Lists Report objects.

Request parameters:

parent - Required. The parent, which owns this collection of reports. Format: curators/{account_id} Value must have pattern ^curators/\[^/\]+$.

filter - Optional. Expression to filter the response. See syntax details at https://developers.google.com/ad-manager/api/beta/filters

orderBy - Optional. Expression to specify sorting order. See syntax details at https://developers.google.com/ad-manager/api/beta/filters#order

pageSize - Optional. The maximum number of Reports to return. The service may return fewer than this value. If unspecified, at most 50 Reports will be returned. The maximum value is 1000; values greater than 1000 will be coerced to 1000.

pageToken - Optional. A page token, received from a previous ListReports call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListReports must match the call that provided the page token.

skip - Optional. Number of individual resources to skip while paginating.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListReportsResponse.

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<ListReportsResponse> list(
  core.String parent, {
  core.String? filter,
  core.String? orderBy,
  core.int? pageSize,
  core.String? pageToken,
  core.int? skip,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'filter': ?filter == null ? null : [filter],
    'orderBy': ?orderBy == null ? null : [orderBy],
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'skip': ?skip == null ? null : ['${skip}'],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/reports';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListReportsResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}