list method

Future<FileList> list(
  1. String profileId,
  2. String reportId, {
  3. int? maxResults,
  4. String? pageToken,
  5. String? sortField,
  6. String? sortOrder,
  7. String? $fields,
})

Lists files for a report.

Request parameters:

profileId - The Campaign Manager 360 user profile ID.

reportId - The ID of the parent report.

maxResults - Maximum number of results to return.

pageToken - The value of the nextToken from the previous result page.

sortField - The field by which to sort the list. Possible string values are:

  • "ID"
  • "LAST_MODIFIED_TIME"

sortOrder - Order of sorted results. Possible string values are:

  • "ASCENDING" : Ascending order.
  • "DESCENDING" : Descending order.

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

Completes with a FileList.

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<FileList> list(
  core.String profileId,
  core.String reportId, {
  core.int? maxResults,
  core.String? pageToken,
  core.String? sortField,
  core.String? sortOrder,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (sortField != null) 'sortField': [sortField],
    if (sortOrder != null) 'sortOrder': [sortOrder],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'userprofiles/' +
      commons.escapeVariable('$profileId') +
      '/reports/' +
      commons.escapeVariable('$reportId') +
      '/files';

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