The SDK entry point. Build one with Zazu.new/1 and pass it as the first
argument to every resource function (Zazu.Accounts, Zazu.Invoices, ...).
Summary
Functions
Joins path segments, URI-escaping each one. Segments may contain literal
/ separators ("api/invoices"); everything between separators is
escaped.
Performs an HTTP request against the API.
Types
@type t() :: %Zazu.Client{ api_key: String.t(), api_version: String.t() | nil, base_url: String.t(), timeout: pos_integer() }
Functions
Joins path segments, URI-escaping each one. Segments may contain literal
/ separators ("api/invoices"); everything between separators is
escaped.
@spec request(t(), atom(), String.t(), keyword() | map(), map() | nil) :: {:ok, Zazu.Response.t()} | {:error, Exception.t()}
Performs an HTTP request against the API.
Non-2xx responses come back as {:error, %Zazu.Error{}}; transport
failures as {:error, %Zazu.ConnectionError{}}. body (when non-nil) is
JSON-encoded.