listDatasets method

Future<ListDatasets200Response?> listDatasets({
  1. String? category,
  2. String? author,
  3. String? license,
  4. String? sort,
  5. int? limit,
  6. int? offset,
  7. Future<void>? abortTrigger,
})

List datasets

Cost: 5-15 credits, by rows returned.

Parameters:

  • String category: Workflow stage, for example heal or extract.

  • String author: Publisher handle, case-insensitive.

  • String license: License string as published.

  • String sort: Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading - flips it. created and first_seen are aliases for the full column names.

  • int limit: Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.

  • int offset: Rows to skip. Negative and non-numeric values are treated as 0.

Implementation

Future<ListDatasets200Response?> listDatasets({ String? category, String? author, String? license, String? sort, int? limit, int? offset, Future<void>? abortTrigger, }) async {
  final response = await listDatasetsWithHttpInfo(category: category, author: author, license: license, sort: sort, limit: limit, offset: offset, abortTrigger: abortTrigger,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ListDatasets200Response',) as ListDatasets200Response;

  }
  return null;
}