stream method
Stream<AuditLogEntry>
stream({
- Snowflake? userId,
- AuditLogEvent? type,
- Snowflake? before,
- Snowflake? after,
- int? pageSize,
- StreamOrder? order,
Same as list
, but has no limit on the number of entries returned.
If after
is set, only entities whose ID is after it will be returned.
If before
is set, only entities whose ID is before it will be returned.
pageSize
can be set to control the limit
parameter of the underlying
requests to the paginated endpoint. Most users will want to leave this
unset and default to the maximum page size.
order
can be set to change the order in which entities are emitted on
the returned stream. Entities will be emitted oldest first if it is not
set, unless only before
is provided, in which case entities will be
emitted most recent first.
Implementation
Stream<AuditLogEntry> stream({
Snowflake? userId,
AuditLogEvent? type,
Snowflake? before,
Snowflake? after,
int? pageSize,
StreamOrder? order,
}) =>
streamPaginatedEndpoint(
({after, before, limit}) => list(userId: userId, type: type, after: after, before: before, limit: limit),
extractId: (entry) => entry.id,
before: before,
after: after,
pageSize: pageSize,
order: order,
);