Expand description
Kick (kick.com) without the I/O.
kicksdk knows Kick: which requests to make, what the answers look like,
how the realtime chat feed speaks, and how webhooks are signed. It never
opens a socket or sends a request itself. The host does that, with whatever
it has: fetch and WebSocket in a browser or an extension, Mint or Gun
under Elixir, reqwest and tokio-tungstenite in a Rust service. That is what
lets one implementation run everywhere, and it is the only way some of it
can work at all: Kick’s realtime server only accepts a socket whose Origin
is https://kick.com, which in a browser means a socket opened by a
kick.com page.
The pieces:
http: aRequestto send, and theErrora parser returns when Kick’s answer is not what it should be.public_api: Kick’s official API (api.kick.com/public/v1) and the app token.website: the endpoints kick.com’s own frontend uses (kick.com/api/v2): the chatroom id, follower totals, chat history, and moderation with a viewer’s session.realtime: the chat feed: where to connect, the guest token, and aSessionstate machine for Kick’s Centrifugo protocol.events: Kick’s chat-feed events, typed.content: chat message text, with its[emote:id:name]tokens.webhooks: the official webhooks: headers, signature and bodies.dispatch(featuredispatch): every function by name, JSON in and out, for bindings that cross a C ABI or a dynamic language.
Everything here is grounded in docs/KICK.md, which records each fact
about Kick with where it was seen. When Kick changes, that file changes
first, then the fixtures, then this code.
Re-exports§
pub use events::KickEvent;pub use http::Endpoints;pub use http::Error;pub use http::Method;pub use http::Request;pub use ids::ChannelId;pub use ids::ChatroomId;pub use ids::UserId;
Modules§
- content
- Chat message text.
- events
- Kick’s chat-feed events, typed.
- http
- Requests to make, and what goes wrong reading the answers.
- ids
- Kick’s three numeric ids, kept apart.
- public_
api - Kick’s official API,
api.kick.com/public/v1. - realtime
- Kick’s realtime chat feed.
- webhooks
- Kick’s official webhooks: the headers, the signature, the bodies.
- website
- The endpoints kick.com’s own frontend uses,
kick.com/api/v2.