Tradehub.Account (Tradehub v0.1.17) View Source
This module enable a power to help developers interacting with public endpoints that focusing on the account and profile information.
Link to this section Summary
Functions
Get account details of the given wallet address
Request the wallet address which is represented by a username.
Get profile details of the given wallet address.
Check if the given username
has been taken.
Link to this section Functions
Specs
account(any()) :: {:error, HTTPoison.Error.t()} | {:ok, Tradehub.account()} | {:ok, %{error: String.t()}}
Get account details of the given wallet address
Examples
iex> Tradehub.Account.account("swth1fdqkq5gc5x8h6a0j9hamc30stlvea6zldprt6q")
Specs
address(Tradehub.text()) :: {:error, HTTPoison.Error.t()} | {:ok, Tradehub.address()}
Request the wallet address which is represented by a username.
If no address is found an exception with status code 404 will be raised.
Examples
iex> Tradehub.Account.address!("tradehub_new_ver_found")
"\n"
Specs
profile(Tradehub.address()) :: {:error, HTTPoison.Error.t()} | {:ok, Tradehub.profile()}
Get profile details of the given wallet address.
Examples
iex> Tradehub.Account.profile("swth1fdqkq5gc5x8h6a0j9hamc30stlvea6zldprt6q")
Specs
username?(Tradehub.text()) :: boolean()
Check if the given username
has been taken.
Examples
iex> Tradehub.Account.username?("tradehub_new_ver_found")
false