getModelDownloadHistoryWithHttpInfo method

Future<Response> getModelDownloadHistoryWithHttpInfo(
  1. String id, {
  2. int? days,
  3. Future<void>? abortTrigger,
})

Per-model download timeline

Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.

Note: This method returns the HTTP Response.

Parameters:

  • String id (required):

  • int days: Window in days (max 365). Pass 0 for full history.

Implementation

Future<Response> getModelDownloadHistoryWithHttpInfo(String id, { int? days, Future<void>? abortTrigger, }) async {
  // ignore: prefer_const_declarations
  final path = r'/api/v1/models/{id}/download-history'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody;

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

  if (days != null) {
    queryParams.addAll(_queryParams('', 'days', days));
  }

  const contentTypes = <String>[];


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