listHistoricalDeletions method
Historical deletions — paged list
Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (downloads, default), recency (recent, newest deaths first) or lifespan (lifespan, longest-lived first — surprising deaths).
Parameters:
-
String sinceMonth: ISO YYYY-MM. Rows with last_seen_month >= it only.
-
int minPeakDownloads: Only rows whose peak downloads >= this.
casualties over Nqueries. -
String sort:
downloads(default, biggest first),recent(newest last_seen_month first),lifespan(longest-lived first). -
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<ListHistoricalDeletions200Response?> listHistoricalDeletions({ String? sinceMonth, int? minPeakDownloads, String? sort, int? limit, int? offset, Future<void>? abortTrigger, }) async {
final response = await listHistoricalDeletionsWithHttpInfo(sinceMonth: sinceMonth, minPeakDownloads: minPeakDownloads, sort: sort, limit: limit, offset: offset, abortTrigger: abortTrigger,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ListHistoricalDeletions200Response',) as ListHistoricalDeletions200Response;
}
return null;
}