riskLabels method
Read the assertions this tenant has recorded
Reads the assertions this tenant has recorded, newest event first. It reads the RECORD — the tenant's own store — and not the columnar copy, so what it returns is what would be produced in an audit. Narrow it by entity, by asserter, or by event window.
Parameters:
-
String kind: Kind and Subject narrow to one entity.
-
String subject:
-
String source_: Source narrows to one asserter — the read that answers "what has commerce told us", separately from "what has an analyst told us".
-
String from: From and To bound the EVENT time, half-open, RFC 3339.
-
String to:
-
int limit: Limit caps the page. Out of range takes the plane's own bound.
Implementation
Future<RiskLabelsOut?> riskLabels({ String? kind, String? subject, String? source_, String? from, String? to, int? limit, }) async {
final response = await riskLabelsWithHttpInfo( kind: kind, subject: subject, source_: source_, from: from, to: to, limit: limit, );
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), 'RiskLabelsOut',) as RiskLabelsOut;
}
return null;
}