UrbitEx (UrbitEx v0.2.0) View Source

Main API for the UrbitEx Package. Initializes the Urbit ship, logs in, opens an Eyre channel and starts an Server-side event pipeline. Start the connection with UrbitEx.start/2 Subscribe to event streams with UrbitEx.subscribe

Link to this section Summary

Functions

Starts the Urbit instance.

Subscribes to event streams. Takes the pid of the connection (returned by UrbitExstart()), and a list of subscriptions. If it's a single subscription you want just wrap it in a list.

Function provided for testing purposes. It will subscribe to the same event streams as the Landscape client does. Returns the pid of the GenServer started. Check the state with check_state(pid) and you can browse all events received, etc.

Link to this section Functions

Starts the Urbit instance.

Examples

iex> {:ok, pid} = UrbitEx.start("http://localhost:8080", "sampel-dozzod-mirtyl-marzod")
Link to this function

subscribe(pid, subscriptions)

View Source

Subscribes to event streams. Takes the pid of the connection (returned by UrbitExstart()), and a list of subscriptions. If it's a single subscription you want just wrap it in a list.

Function provided for testing purposes. It will subscribe to the same event streams as the Landscape client does. Returns the pid of the GenServer started. Check the state with check_state(pid) and you can browse all events received, etc.