listDatasetsWithHttpInfo method

Future<Response> listDatasetsWithHttpInfo({
  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.

Note: This method returns the HTTP Response.

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<Response> listDatasetsWithHttpInfo({ String? category, String? author, String? license, String? sort, int? limit, int? offset, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/datasets';

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (category != null) {
    queryParams.addAll(_queryParams('', 'category', category));
  }
  if (author != null) {
    queryParams.addAll(_queryParams('', 'author', author));
  }
  if (license != null) {
    queryParams.addAll(_queryParams('', 'license', license));
  }
  if (sort != null) {
    queryParams.addAll(_queryParams('', 'sort', sort));
  }
  if (limit != null) {
    queryParams.addAll(_queryParams('', 'limit', limit));
  }
  if (offset != null) {
    queryParams.addAll(_queryParams('', 'offset', offset));
  }

  const contentTypes = <String>[];


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