getJobResultsWithHttpInfo method

Future<Response> getJobResultsWithHttpInfo(
  1. String jobId, {
  2. String? format,
  3. String? filter,
  4. int? page,
  5. int? perPage,
})

Get job results

Download validation results in JSON, CSV, or NDJSON format.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> getJobResultsWithHttpInfo(String jobId, { String? format, String? filter, int? page, int? perPage, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/jobs/{job_id}/results'
    .replaceAll('{job_id}', jobId);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (format != null) {
    queryParams.addAll(_queryParams('', 'format', format));
  }
  if (filter != null) {
    queryParams.addAll(_queryParams('', 'filter', filter));
  }
  if (page != null) {
    queryParams.addAll(_queryParams('', 'page', page));
  }
  if (perPage != null) {
    queryParams.addAll(_queryParams('', 'per_page', perPage));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}