listAnomaliesWithHttpInfo method
Anomalies in the download counter (change stream)
Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = spike, 0.5× fall = drop. Sorted by absolute delta so biggest movers surface first. Consumers get "what is happening in the field right now" without re-implementing the ETL over download_history.
Note: This method returns the HTTP Response.
Parameters:
-
int windowDays: Baseline distance in days. Default 7, min 1, max 365.
-
int minBaseline: Only rows where baseline downloads >= this. Filters
0→10noise. Default 1000. -
String kind: Filter to one class. Omit for both.
-
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> listAnomaliesWithHttpInfo({ int? windowDays, int? minBaseline, String? kind, int? limit, int? offset, Future<void>? abortTrigger, }) async {
// ignore: prefer_const_declarations
final path = r'/api/v1/market/anomalies';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (windowDays != null) {
queryParams.addAll(_queryParams('', 'window_days', windowDays));
}
if (minBaseline != null) {
queryParams.addAll(_queryParams('', 'min_baseline', minBaseline));
}
if (kind != null) {
queryParams.addAll(_queryParams('', 'kind', kind));
}
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,
);
}