soup-sdk
Rust SDK for SOOP live information, VOD metadata, VOD chat parsing, and live chat event streaming.
The crate currently focuses on:
- SOOP HTTP API helpers through
SoopHttpClient. - Live WebSocket chat connection through
SoopChatConnection. - Structured chat events through
Event. - VOD chat XML parsing into the same event model where possible.
Documentation
- HTTP_API.md:
SoopHttpClientmethods and return types. - CHAT.md: live chat connection lifecycle and command/event channels.
- EVENTS.md: event enum and payload reference.
- ARCHITECTURE.md: internal architecture and refactor direction.
- RULES.md: working rules for AI agents and maintainers.
Installation
When using this crate from the same workspace or a local checkout:
[]
= { = "libs/soup-sdk-rs" }
When the crate is published to a registry, use the published version:
[]
= "0.3.0"
The package name is soup-sdk; the Rust import path is soup_sdk.
Requirements
- Rust edition 2024.
- Tokio async runtime.
- Network access to SOOP HTTP and WebSocket endpoints.
- HTTP requests and WebSocket connection attempts use a default 15-second timeout.
Quick Start: HTTP API
use ;
async
Quick Start: Live Chat
use Arc;
use ;
async
Quick Start: VOD Chat
use ;
async
Error Handling
Most SDK operations return soup_sdk::Result<T>, which uses soup_sdk::Error.
Current error categories include:
- HTTP request failures.
- WebSocket connection and protocol failures.
- JSON parsing failures.
- URL parsing failures.
- internal channel failures.
- offline stream state.
- upstream API errors represented as strings.
Parser failures and protocol drift are observable through Event::Diagnostic when live chat diagnostics are enabled. See EVENTS.md for details.
Current Limitations
- Live chat reconnect is intentionally not automatic in v0.3. A disconnected session emits a reason and can be recreated by the caller.
- Chat send is not exposed in v0.3.
- VOD full chat collection returns structured chunk success/failure metadata.
- Live chat TLS certificate verification is currently disabled for compatibility with the upstream chat endpoint. This is intentionally documented and should be treated as a security tradeoff.
These limitations are documented so downstream users and future contributors can reason about current behavior without reading implementation code.