listDelistedModels method
List delisted models (change stream)
Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with since=<last_seen_at of your previous run> to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or "wayback" tools live on this endpoint. See /api#change-stream.
Parameters:
-
String since: ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll's newest last_seen_at to build an incremental feed.
-
String sort:
recent(default, newest disappearance first) ordownloads(biggest casualties first — best for post-mortem coverage). -
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<ListDelistedModels200Response?> listDelistedModels({ String? since, String? sort, int? limit, int? offset, Future<void>? abortTrigger, }) async {
final response = await listDelistedModelsWithHttpInfo(since: since, 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), 'ListDelistedModels200Response',) as ListDelistedModels200Response;
}
return null;
}