FocusAtWillEx.ClientBehaviour behaviour (focus_at_will_ex v0.1.0)

View Source

Behaviour definintion for Focus@Will API client

Summary

Types

channel()

@type channel() :: FocusAtWillEx.Channels.Channel.t()

error()

@type error() :: FocusAtWillEx.Client.Error

response()

@type response() :: Req.Response.t() | Exception.t()

session()

@type session() :: FocusAtWillEx.Session.t()

Callbacks

authenticate(email, password)

@callback authenticate(email :: String.t(), password :: String.t()) ::
  {:ok, response()} | {:error, error()}

fetch_sequence_track(session, channel, energy_level, slot_index)

@callback fetch_sequence_track(
  session :: session(),
  channel :: channel(),
  energy_level :: integer(),
  slot_index :: integer()
) :: {:ok, response()} | {:error, error()}