list method

Future<ListScreenshotClustersResponse> list(
  1. String projectId,
  2. String historyId,
  3. String executionId, {
  4. String? $fields,
})

Lists Screenshot Clusters Returns the list of screenshot clusters corresponding to an execution.

Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.

Request parameters:

projectId - A Project id. Required.

historyId - A History id. Required.

executionId - An Execution id. Required.

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

Completes with a ListScreenshotClustersResponse.

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<ListScreenshotClustersResponse> list(
  core.String projectId,
  core.String historyId,
  core.String executionId, {
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'toolresults/v1beta3/projects/' +
      commons.escapeVariable('$projectId') +
      '/histories/' +
      commons.escapeVariable('$historyId') +
      '/executions/' +
      commons.escapeVariable('$executionId') +
      '/clusters';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return ListScreenshotClustersResponse.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}