What a client asks a server it does not run in: a token for a name and password over
HTTP (Cauldron2D.Net.Api), the arenas, the server's stats and boards; and the same
from a node it is connected to.
{:ok, token} = Cauldron2D.Net.Remote.login("http://arcade:2280", "alice", "secret", false)
{:ok, arenas} = Cauldron2D.Net.Remote.arenas("http://arcade:2280")
{:ok, arenas} = Cauldron2D.Net.Remote.node_arenas(:"my_game@arcade")
{:ok, world} = Cauldron2D.Net.Remote.node_world(:"my_game@arcade", :pit)url is the server's base URL with the API's path, http://host:port/api for an
API forwarded at /api.
Summary
Functions
The arenas from GET <url>/arenas.
A board from GET <url>/leaders, as Cauldron2D.Ledger.board/4 gives it, accounts as strings.
A token from POST <url>/token; register? makes the account first. {:error, text} with the server's reason.
The arenas of a connected node, as its Cauldron2D.Arenas.list/0 gives them.
A board of a connected node's ledger.
The pid of arena id's world on node, started there if it was not running.
How the server is keeping up, from GET <url>/stats, with atom keys.
Types
Functions
The arenas from GET <url>/arenas.
A board from GET <url>/leaders, as Cauldron2D.Ledger.board/4 gives it, accounts as strings.
@spec login(String.t(), String.t(), String.t(), boolean()) :: {:ok, String.t()} | {:error, String.t()}
A token from POST <url>/token; register? makes the account first. {:error, text} with the server's reason.
The arenas of a connected node, as its Cauldron2D.Arenas.list/0 gives them.
@spec node_leaders(node(), GenServer.name(), atom(), atom(), keyword()) :: {:ok, [map()]} | {:error, String.t()}
A board of a connected node's ledger.
The pid of arena id's world on node, started there if it was not running.
How the server is keeping up, from GET <url>/stats, with atom keys.