View Source
MyspaceIPFS.Utils
(Myspace IPFS v0.0.1)
MyspaceIPFS.Utils is where common functions of the library are defined.
Alias this library and you can run the commands via Utils.<cmd_name>.
## Examples
iex> alias MyspaceIPFS.Utils, as: Utils
iex> Api.get("Multihash_key")
<<0, 19, 148, 0, ... >>
@spec request_get(binary()) ::
{:client_error | :forbidden | :missing | :not_allowed | :ok | :server_error,
any()}
@spec request_get(binary(), binary()) ::
{:client_error | :forbidden | :missing | :not_allowed | :ok | :server_error,
any()}
@spec request_post(any(), binary()) ::
{:client_error | :forbidden | :missing | :not_allowed | :ok | :server_error,
any()}