gwitch

Types

Credentials for authenticating with Twitch Not required for anonymous connections

pub type LoginCredentials {
  Static(username: String, password: String)
}

Constructors

  • Static(username: String, password: String)

Functions

pub fn connect(
  channel: String,
  creds: Option(LoginCredentials),
) -> Subject(InternalMessage(Msg))

A function for connecting to a twitch channel. Returns a subject for sending and receiving messages

pub fn get_twitch_subj() -> Subject(InternalMessage(Msg))

A function for building the initial Twitch connection

pub fn join_channel(
  subj: Subject(InternalMessage(Msg)),
  channel: String,
) -> Nil

A function for joining a Twitch channel

pub fn login(
  subj: Subject(InternalMessage(Msg)),
  creds: Option(LoginCredentials),
) -> Nil

A function for logging into Twitch Pass None for the creds to use the an anonymous account

Search Document