View Source TwitchEventSub.WebSocket (hello_twitch_eventsub v0.1.4)

TwitchEventSub websocket client supervisor. See the option/0 type for the required options.

Summary

Types

Twitch app access token with required scopes for the provided subscriptions

The IDs of the channels we're subscribing to or something.

Twitch app client id.

The module that implements TwitchEventSub.

The keepalive timeout in seconds. Specifying an invalid, numeric value will return the nearest acceptable value. Optional. Defaults to 10.

The options accepted (or required) by the Websocket client.

Tell the websocket client whether or not it should be started. Optional. Defaults to true.

The subscriptions for EventSub. Optional. Defaults to a bunch. Check TwitchEventSub.Websocket.Client for the defaults.

A websocket URL to connect to. Optional. Defaults to "wss://eventsub.wss.twitch.tv/ws".

The user ID of the broadcaster or bot user we are using for subscriptions.

Functions

Returns a specification to start this module under a supervisor.

Types

@type access_token() :: String.t()

Twitch app access token with required scopes for the provided subscriptions

@type channel_ids() :: [String.t()]

The IDs of the channels we're subscribing to or something.

@type client_id() :: String.t()

Twitch app client id.

@type handler() :: module()

The module that implements TwitchEventSub.

@type keepalive_timeout() :: pos_integer()

The keepalive timeout in seconds. Specifying an invalid, numeric value will return the nearest acceptable value. Optional. Defaults to 10.

@type option() ::
  {:access_token, access_token()}
  | {:client_id, client_id()}
  | {:channel_ids, channel_ids()}
  | {:handler, handler()}
  | {:keepalive_timeout, keepalive_timeout()}
  | {:start?, start?()}
  | {:subscriptions, subscriptions()}
  | {:url, url()}
  | {:user_id, user_id()}

The options accepted (or required) by the Websocket client.

@type start?() :: boolean() | nil

Tell the websocket client whether or not it should be started. Optional. Defaults to true.

@type subscriptions() :: [%{condition: map()}]

The subscriptions for EventSub. Optional. Defaults to a bunch. Check TwitchEventSub.Websocket.Client for the defaults.

@type url() :: String.t()

A websocket URL to connect to. Optional. Defaults to "wss://eventsub.wss.twitch.tv/ws".

@type user_id() :: String.t()

The user ID of the broadcaster or bot user we are using for subscriptions.

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.