The Pluggy API client.
Holds a configured Req.Request with authentication, key transformation,
and base URL setup.
Usage
{:ok, client} = Pluggy.Client.new("your_client_id", "your_client_secret")
client = Pluggy.Client.new!("your_client_id", "your_client_secret")
# With options
{:ok, client} = Pluggy.Client.new("id", "secret",
base_url: "https://custom.api.url",
req_options: [receive_timeout: 30_000]
)
Summary
Functions
Requests a connect token.
Like connect_token/2 but raises on error.
Creates a new Pluggy client.
Like new/3 but raises on error.
Types
@type t() :: %Pluggy.Client{ client_id: String.t(), client_secret: String.t(), req: Req.Request.t() }
Functions
@spec connect_token( t(), keyword() ) :: {:ok, String.t()} | {:error, Pluggy.Error.t()}
Requests a connect token.
Options
:item_id- Optional item ID to create a token for updating an existing item:options- Optional map of connect token options
Like connect_token/2 but raises on error.
Creates a new Pluggy client.
Options
:base_url- Override the default Pluggy API base URL:req_options- Additional options passed toReq.new/1
Like new/3 but raises on error.