glitch/eventsub/client

Types

pub type Client =
  Subject(Message)
pub opaque type ClientState
pub opaque type Message
pub type Status {
  Running
  Stopped
}

Constructors

  • Running
  • Stopped

Functions

pub fn api_client(client: Subject(Message)) -> Client
pub fn new(
  api_client api_client: Client,
  websocket_mailbox parent_websocket_message_mailbox: Subject(
    WebSocketMessage,
  ),
  parent_subject parent_subject: Subject(Subject(Message)),
) -> fn(Nil) -> Result(Subject(Message), StartError)
pub fn session_id(
  client: Subject(Message),
) -> Result(String, Nil)
pub fn start(client: Subject(Message)) -> Nil
pub fn subscribe(
  client: Subject(Message),
  subscription_request: CreateEventSubscriptionRequest,
  subscription_event_mailbox: Subject(Event),
) -> Result(Nil, TwitchError)
pub fn websocket_message_mailbox(
  client: Subject(Message),
) -> Subject(WebSocketMessage)
Search Document