Discovergy v0.2.0 Discovergy.Client View Source
A Discovergy API Client
Link to this section Summary
Functions
Authenticate with the Discovergy API using the email address and password of the user.
Creates a new Discovergy API client.
Link to this section Types
Specs
t()
Link to this section Functions
Specs
login(t(), String.t(), String.t()) :: {:ok, t()} | {:error, Discovergy.Error.t()}
Authenticate with the Discovergy API using the email address and password of the user.
Examples
iex> {:ok, client} = Discovergy.Client.new()
...> |> Discovergy.Client.login(email, password)
{:ok, %Discovergy.Client{}}
Specs
Creates a new Discovergy API client.
Options
:consumer
- a custom consumer token (seeDiscovergy.OAuth.Consumer
):token
- a custom access token (seeDiscovergy.OAuth.Token
):base_url
- the base URL for all endpoints (default:https://api.discovergy.com/public/v1
):adapter
- the Tesla adapter for the API client (default:{Tesla.Adapter.Hackney, pool: :default}
)
Examples
iex> client = Discovergy.Client.new()
%Discovergy.Client{}