Operate v0.1.0-beta.5 Operate.Adapter.Bob View Source

Adapter module for loading tapes and Ops from BOB.

Examples

iex> Operate.Adapter.Bob.fetch_tx(txid, api_key: "mykey")
{:ok, %Operate.BPU.Transaction{}}

Link to this section Summary

Functions

Fetches a list of Ops by the given list of Op references. Returns the result in an :ok / :error tuple pair.

As c:fetch_ops/2, but returns the result or raises an exception.

Fetches a transaction by the given txid, and returns the result in an :ok / :error tuple pair.

As c:fetch_tx/2, but returns the transaction or raises an exception.

Converts the map from the Planaria HTTP response to a Operate.BPU.Transaction.t/0.

Link to this section Types

Link to this type

option()

View Source
option() ::
  {:method, Tesla.Env.method()}
  | {:url, Tesla.Env.url()}
  | {:query, Tesla.Env.query()}
  | {:headers, Tesla.Env.headers()}
  | {:body, Tesla.Env.body()}
  | {:opts, Tesla.Env.opts()}

Link to this section Functions

Link to this function

fetch_ops(refs, options \\ [])

View Source

Fetches a list of Ops by the given list of Op references. Returns the result in an :ok / :error tuple pair.

Callback implementation for Operate.Adapter.fetch_ops/2.

Link to this function

fetch_ops!(refs, options \\ [])

View Source

As c:fetch_ops/2, but returns the result or raises an exception.

Callback implementation for Operate.Adapter.fetch_ops!/2.

Link to this function

fetch_tx(txid, options \\ [])

View Source

Fetches a transaction by the given txid, and returns the result in an :ok / :error tuple pair.

Callback implementation for Operate.Adapter.fetch_tx/2.

Link to this function

fetch_tx!(txid, options \\ [])

View Source

As c:fetch_tx/2, but returns the transaction or raises an exception.

Callback implementation for Operate.Adapter.fetch_tx!/2.

Converts the map from the Planaria HTTP response to a Operate.BPU.Transaction.t/0.