GelotvBot.Target (GeloTVBot v0.1.0)

Copy Markdown View Source

Destination for one platform/channel/livestream chat.

adapter is any module implementing GelotvBot.Adapter. rate_limit accepts :limit, :interval, and optional :burst values:

%GelotvBot.Target{
  platform: :twitch,
  channel: "gelotv",
  adapter: MyApp.TwitchAdapter,
  rate_limit: [limit: 20, interval: 30_000, burst: 5]
}

Summary

Types

platform()

@type platform() :: :twitch | :youtube | :kick | atom()

t()

@type t() :: %GelotvBot.Target{
  adapter: module(),
  channel: String.t(),
  credentials: term(),
  platform: platform(),
  rate_limit: keyword(),
  tags: map()
}

Functions

key(target)

@spec key(t()) :: term()

new(attrs)

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

validate(target)

@spec validate(t()) :: :ok | {:error, term()}