Blur v0.2.1-beta1 Blur.Channel View Source
Channel module
Link to this section Summary
Functions
Add user to channel
Get aliases for a channel
Returns a specification to start this module under a supervisor.
Get commands for a channel
Get config for a channel
Handle channel info
Handle channel users
Remove user from the channel
Start channel store
Get users in a channel
Link to this section Functions
Specs
Add user to channel
Examples
iex> Blur.Channel.add_user "#rockerboo", "rockerBOO"
:ok
Specs
Get aliases for a channel
Examples
iex> Blur.Channel.aliases "#rockerboo"
%{}
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
Get commands for a channel
Examples
iex> Blur.Channel.commands "#rockerboo"
%{}
Specs
Get config for a channel
Examples
iex> Blur.Channel.config? "#rockerboo"
%{}
Specs
handle_call(:aliases, pid(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }) :: {:reply, map(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }}
handle_call(:commands, pid(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }) :: {:reply, map(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }}
handle_call(:config?, pid(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }) :: {:reply, nil | map(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }}
handle_call(:users, pid(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }) :: {:reply, list(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }}
Handle channel info
Specs
handle_cast({:add_user, user :: binary()}, %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }) :: {:reply, list(), %Blur.Channel.State{ channel: term(), client: term(), config?: term(), users: term() }}
Handle channel users
Specs
Remove user from the channel
Examples
iex> Blur.Channel.remove_user "#rockerboo", "rockerBOO"
:ok
Specs
start_link(client :: pid(), channel :: binary()) :: GenServer.on_start()
Start channel store
Specs
Specs
users(channel :: binary()) :: :ok
Get users in a channel
Examples
iex> Blur.Channel.users "#rockerboo"
["rockerBOO"]