run method

Future<File> run(
  1. String profileId,
  2. String reportId, {
  3. bool? synchronous,
  4. String? $fields,
})

Runs a report.

Request parameters:

profileId - The Campaign Manager 360 user profile ID.

reportId - The ID of the report.

synchronous - If set and true, tries to run the report synchronously.

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

Completes with a File.

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<File> run(
  core.String profileId,
  core.String reportId, {
  core.bool? synchronous,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (synchronous != null) 'synchronous': ['${synchronous}'],
    if ($fields != null) 'fields': [$fields],
  };

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

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