list method

Future<ListJobsResponse> list({
  1. bool? includeSystemManaged,
  2. String? onBehalfOfContentOwner,
  3. int? pageSize,
  4. String? pageToken,
  5. String? $fields,
})

Lists jobs.

Request parameters:

includeSystemManaged - If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be returned. System-managed jobs can neither be modified nor deleted.

onBehalfOfContentOwner - The content owner's external ID on which behalf the user is acting on. If not set, the user is acting for himself (his own channel).

pageSize - Requested page size. Server may return fewer jobs than requested. If unspecified, server will pick an appropriate default.

pageToken - A token identifying a page of results the server should return. Typically, this is the value of ListReportTypesResponse.next_page_token returned in response to the previous call to the ListJobs method.

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

Completes with a ListJobsResponse.

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<ListJobsResponse> list({
  core.bool? includeSystemManaged,
  core.String? onBehalfOfContentOwner,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (includeSystemManaged != null)
      'includeSystemManaged': ['${includeSystemManaged}'],
    if (onBehalfOfContentOwner != null)
      'onBehalfOfContentOwner': [onBehalfOfContentOwner],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/jobs';

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