Discovergy v0.1.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

Link to this section Functions

Link to this function

login(client, email, password)

View Source

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

new(Keyword.t()) :: t()

Creates a new Discovergy API client.

Options

  • :consumer - a custom consumer token (see Discovergy.OAuth.Consumer)
  • :token - a custom access token (see Discovergy.OAuth.AccessToken)
  • :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)

Examples

iex> client = Discovergy.Client.new()
%Discovergy.Client{}