listAuthorsWithHttpInfo method
List authors
Cost: 5-15 credits, by rows returned.
Note: This method returns the HTTP Response.
Parameters:
-
String sort: Bare key is DESC (largest first); a leading
-flips to ASC. Aliases:downloads==total_downloads,models==total_models,likes==total_likes. -
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> listAuthorsWithHttpInfo({ String? sort, int? limit, int? offset, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/authors';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
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,
);
}