Toxico (toxico v0.1.1)
Toxico bindings for ctox-core using Unifex.
Link to this section Summary
Functions
Sends a "get nodes" request to the given bootstrap node with IP, port, and public key to setup connections.
Add a friend to the friend list and send a friend request.
Add a friend without sending a friend request.
Returns a specification to start this module under a supervisor.
Add a friend without sending a friend request.
Friend name
Status message of the friend
Query self client information.
Send a text chat message to an online friend.
Set the nickname for the Tox client.
Set the client's status.
Set the client's status message.
Set the client's typing status for a friend.
tox api version
Link to this section Functions
add_bootstrap(name, host, port, public_key)
Specs
add_bootstrap(GenServer.name(), String.t(), integer(), String.t()) :: :ok | {:error, :null} | {:error, :bad_host} | {:error, :port}
Sends a "get nodes" request to the given bootstrap node with IP, port, and public key to setup connections.
add_friend(name, address, message)
Specs
add_friend(GenServer.name(), String.t(), String) :: {:ok, integer()} | {:error, atom()}
Add a friend to the friend list and send a friend request.
add_friend_norequest(name, public_key)
Specs
add_friend_norequest(GenServer.name(), String.t()) :: {:ok, integer()} | {:error, atom()}
Add a friend without sending a friend request.
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
delete_friend(name, friend_number)
Specs
delete_friend(GenServer.name(), integer()) :: :ok | {:error, atom()}
Add a friend without sending a friend request.
friend_name(name, friend_number)
Specs
friend_name(GenServer.name(), integer()) :: {:ok, String.t()} | {:error, atom()}
Friend name
friend_status_message(name, friend_number)
Specs
friend_status_message(GenServer.name(), integer()) :: {:ok, String.t()} | {:error, atom()}
Status message of the friend
self(name)
Specs
self(GenServer.name()) :: %Toxico.Self{ address: term(), name: term(), nospam: term(), status: term(), status_message: term() }
Query self client information.
send_message_friend(name, friend_number, message)
Specs
send_message_friend(GenServer.name(), integer(), String.t()) :: :ok | {:error, atom()}
Send a text chat message to an online friend.
set_name(tox, name)
Specs
set_name(GenServer.name(), String.t()) :: :ok | {:error, atom()}
Set the nickname for the Tox client.
set_status(tox, status)
Specs
set_status(GenServer.name(), :user_none | :user_away | :user_busy) :: :ok
Set the client's status.
set_status_message(tox, message)
Specs
set_status_message(GenServer.name(), String.t()) :: :ok | {:error, atom()}
Set the client's status message.
set_typing(name, friend_number, status)
Specs
set_typing(GenServer.name(), integer(), :start | :end) :: :ok | {:error, term()}
Set the client's typing status for a friend.
start_link(opts \\ [])
version(name)
Specs
version(GenServer.name()) :: Version.t() | nil
tox api version