ExIpfs.Refs (Elixir IPFS v0.2.1)

Copy Markdown View Source

ExIpfs.Refs is where the commands to lookup references are defined.

To get a gist of the contents, try:

iex> ExIpfs.Refs.local()

Summary

Types

t()

A ref as reported from the refs group of commands

Functions

Get a list of all local references.

Get a list of all references from a given path.

Types

t()

@type t() :: %ExIpfs.RefsRef{err: binary() | nil, ref: binary()}

A ref as reported from the refs group of commands

Functions

local()

@spec local() :: {:ok, [t()]} | ExIpfs.Api.error_response()

Get a list of all local references.

Response is a list of ExIpfs.ref().

refs(path, opts \\ [])

@spec refs(Path.t(), list()) :: {:ok, [map()]} | ExIpfs.Api.error_response()

Get a list of all references from a given path.

Options

https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-refs

[
  format: "<dst>", # Emit edges with given format. Available tokens: <src> <dst> <linkname>
  edges: false, # Emit edge format: <from> -> <to>
  unique: false, # Omit duplicate refs
  recursive: false, # Recursively list child links
  :'max-depth': -1 # Limit recursion depth (only used with recursive refs)
]