listDatasetsWithHttpInfo method
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.createdandfirst_seenare 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,
);
}