IpfsApi
The module is a client to call into IPFS REST endpoint.
Summary
Functions
Add an object to ipfs
Get a raw IPFS block
Stores input as an IPFS block
Print information of a raw IPFS block
Gets the list of bootstrap peers
Add peers to the bootstrap list
Remoes peers from the bootstrap list
Show ipfs object data
Gets the content of the config file
Run a FindPeer query through the DHT
Run a FundProviders quest through the DHT
Run a GetValue query through the DHT
Run a PutValue query through the DHT
Run a FindClosesPeers query through the DHT
Resolve the DNS link TODO: Add ability to resolve recursively
List directory content for path
Get an ipfs object
Gets the information about the specified peer_id
List links from an object
Publish the ipfs_path
to your identity name
Resolve the value of name
The raw bytes in an IPFS object
Get and serialize the DAG node name by multihash
The links pointed to by the specified object
Create a new merkledag object base on an existing one
Stores content
as a DAG object
Get stats for the DAG node name by key
Pins objects to local storage
List objects pinned to local storage
Remove the pinned object from local storage TODO: Add ability to resolve recursively
Send echo request packets to IPFS hosts TODO: Add ability to give number of count
List hashes of links from an object
Perform a grabage collection sweep on the repo
Resolve the value of the name
TODO: Add ability to resolve recursively
List known addresses
Open connection to given address
Close connection to give address
Add an address filter
Remove an address filter
List peers with open connections
Gets the IPFS version
Types
request_ret :: {:ok, Dict.t} | {:error, String.t}
Functions
Specs
add(IpfsConnection.t, binary) :: request_ret
add(IpfsConnection.t, binary) :: request_ret
Add an object to ipfs
Examples
IpfsApi.add(%IpfsConnection{}, "Hello World")
Specs
block_get(IpfsConnection.t, String.t) :: request_ret
Get a raw IPFS block
Specs
block_put(IpfsConnection.t, binary) :: request_ret
Stores input as an IPFS block
Specs
block_stat(IpfsConnection.t, String.t) :: request_ret
Print information of a raw IPFS block
Specs
bootstrap(IpfsConnection.t) :: request_ret
Gets the list of bootstrap peers
Specs
bootstrap_add(IpfsConnection.t, String.t) :: request_ret
Add peers to the bootstrap list
Specs
bootstrap_rm(IpfsConnection.t, String.t) :: request_ret
Remoes peers from the bootstrap list
Specs
cat(IpfsConnection.t, String.t) :: request_ret
Show ipfs object data
Specs
config_show(IpfsConnection.t) :: request_ret
Gets the content of the config file
Specs
dht_findpeer(IpfsConnection.t, String.t) :: request_ret
Run a FindPeer query through the DHT
Specs
dht_findprovs(IpfsConnection.t, String.t) :: request_ret
Run a FundProviders quest through the DHT
Specs
dht_get(IpfsConnection.t, String.t) :: request_ret
Run a GetValue query through the DHT
Specs
dht_put(IpfsConnection.t, String.t, String.t) :: request_ret
Run a PutValue query through the DHT
Specs
dht_query(IpfsConnection.t, String.t) :: request_ret
Run a FindClosesPeers query through the DHT
Specs
dns(IpfsConnection.t, String.t) :: request_ret
Resolve the DNS link TODO: Add ability to resolve recursively
Specs
file_ls(IpfsConnection.t, String.t) :: request_ret
List directory content for path
Specs
get(IpfsConnection.t, String.t) ::
{:ok, binary} |
{:error, String.t}
Get an ipfs object
Examples
IpfsApi.get(%IpfsConnection{}, "QmUXTtySmd7LD4p6RG6rZW6RuUuPZXTtNMmRQ6DSQo3aMw")
Specs
id(IpfsConnection.t, String.t) :: request_ret
Gets the information about the specified peer_id
Specs
ls(IpfsConnection.t, String.t) :: request_ret
List links from an object
Specs
name_publish(IpfsConnection.t, String.t) :: request_ret
Publish the ipfs_path
to your identity name
Specs
name_resolve(IpfsConnection.t, String.t) :: request_ret
Resolve the value of name
Specs
object_data(IpfsConnection.t, String.t) :: request_ret
The raw bytes in an IPFS object
Specs
object_get(IpfsConnection.t, String.t) :: request_ret
Get and serialize the DAG node name by multihash
Specs
object_links(IpfsConnection.t, String.t) :: request_ret
The links pointed to by the specified object
Specs
object_patch(IpfsConnection.t, String.t) :: request_ret
Create a new merkledag object base on an existing one
Specs
object_put(IpfsConnection.t, binary) :: request_ret
Stores content
as a DAG object
Specs
object_stat(IpfsConnection.t, String.t) :: request_ret
Get stats for the DAG node name by key
Specs
pin_add(IpfsConnection.t, String.t) :: request_ret
Pins objects to local storage
Specs
pin_ls(IpfsConnection.t) :: request_ret
List objects pinned to local storage
Specs
pin_rm(IpfsConnection.t, String.t) :: request_ret
Remove the pinned object from local storage TODO: Add ability to resolve recursively
Specs
ping(IpfsConnection.t, String.t) :: request_ret
Send echo request packets to IPFS hosts TODO: Add ability to give number of count
Specs
refs(IpfsConnection.t, String.t) :: request_ret
List hashes of links from an object
Specs
repo_gc(IpfsConnection.t) :: request_ret
Perform a grabage collection sweep on the repo
Specs
resolve(IpfsConnection.t, String.t) :: request_ret
Resolve the value of the name
TODO: Add ability to resolve recursively
Specs
swarm_connect(IpfsConnection.t, String.t) :: request_ret
Open connection to given address
Specs
swarm_disconnect(IpfsConnection.t, String.t) :: request_ret
Close connection to give address
Specs
swarm_filters_add(IpfsConnection.t, String.t) :: request_ret
Add an address filter
Specs
swarm_filters_rm(IpfsConnection.t, String.t) :: request_ret
Remove an address filter
Specs
swarm_peers(IpfsConnection.t) :: request_ret
List peers with open connections