UrbitEx (UrbitEx v0.6.2) View Source
Main API for the UrbitEx Package. Includes functions to initiate your Urbit session, subscribe to main event sources and set up logic to handle events.
Link to this section Summary
Functions
Fetches the state of a running Urbit Session. Returns a Session struct.
Fetches the state of a channel, :main
as default.
Returns a Channel struct.
Shuts down an Urbit Session and associated Eyre Channels. Returns true
.
Starts an Eyre channel subscribed to the same subscriptions as Landscape does. Returns a UrbitEx.Session struct.
Reconnects to a running Urbit instance without logging in, provided you have stored a valid cookie from a previous session. Starts a Session GenServer. Takes a url string and a cookie string, and a boolean; if true, the Session is started as a linked process. Returns an {:ok, pid} tuple.
Logs in to Urbit to an Urbit instance and starts an unlinked GenServer. Takes the url where your ship is running, the +code
,
and an optional name for the server (handy if you're running multiple ones).
Logs in to Urbit to an Urbit instance and starts a linked GenServer. Takes the url where your ship is running, the +code
,
and an optional name for the server (handy if you're running multiple ones).
Starts a new channel subscribed to herm
, the virtual terminal.
Returns a UrbitEx.Channel struct.
You can pass that struct to the UrbitEx.Terminal module functions and interact with the terminal.
Link to this section Functions
Fetches the state of a running Urbit Session. Returns a Session struct.
Fetches the state of a channel, :main
as default.
Returns a Channel struct.
Shuts down an Urbit Session and associated Eyre Channels. Returns true
.
Starts an Eyre channel subscribed to the same subscriptions as Landscape does. Returns a UrbitEx.Session struct.
Reconnects to a running Urbit instance without logging in, provided you have stored a valid cookie from a previous session. Starts a Session GenServer. Takes a url string and a cookie string, and a boolean; if true, the Session is started as a linked process. Returns an {:ok, pid} tuple.
Examples
iex> {:ok, pid} = UrbitEx.reconnect("http://localhost:8080", "urbauth-~sampel-planet-0v4...")
Logs in to Urbit to an Urbit instance and starts an unlinked GenServer. Takes the url where your ship is running, the +code
,
and an optional name for the server (handy if you're running multiple ones).
Examples
iex> {:ok, pid} = UrbitEx.start("http://localhost:8080", "sampel-dozzod-mirtyl-marzod")
Logs in to Urbit to an Urbit instance and starts a linked GenServer. Takes the url where your ship is running, the +code
,
and an optional name for the server (handy if you're running multiple ones).
Examples
iex> {:ok, pid} = UrbitEx.start("http://localhost:8080", "sampel-dozzod-mirtyl-marzod")
Starts a new channel subscribed to herm
, the virtual terminal.
Returns a UrbitEx.Channel struct.
You can pass that struct to the UrbitEx.Terminal module functions and interact with the terminal.