Skip to main content

Module events

Module events 

Source
Expand description

Kick’s chat-feed events, typed.

The realtime feed delivers each event as Kick’s own envelope, an event name and its data (usually a JSON string). parse turns that into a KickEvent. Parsing is lenient: a field Kick leaves out or sends in another type comes out as None, and an event this crate does not know comes out as KickEvent::Unknown rather than an error, so a new event from Kick never breaks a client that does not care about it.

Which feed carries which event is in crate::realtime::chat_channels.

Modules§

names
Kick’s event names, as they arrive.

Structs§

Badge
A badge in Kick’s first format (identity.badges).
BadgeImage
A badge in Kick’s image format (identity.badges_v2). Badges the user chose not to show (selected: false) are left out.
ChatMessage
A chat message.
Hosted
The channel a host went to, on the hosting side.
KicksGift
A Kicks gift.
ReplyTo
What a reply answers.
Sender
Who sent a chat message.
UserRef
Someone named in an event.

Enums§

KickEvent
One event from the chat feed.

Functions§

chat_message
A chat message from its data, or None if it has no id, sender name or text. Also reads the messages in the website API’s history.
parse
Reads one feed event: its name, and its data as Kick sent it (a JSON string, or a value).