Sendio.Client behaviour (sendio v1.1.0)
send.io API client.
Summary
Types
A module implementing the Castable behaviour, or a tuple for generic types
Functions
The default API base URL (https://api.send.io).
Creates a new send.io client struct given a keyword list of config opts.
Types
Link to this type
castable()
A module implementing the Castable behaviour, or a tuple for generic types
Link to this type
response(type)
@type response(type) :: {:ok, type} | {:error, Sendio.Error.t() | :client_error}
Callbacks
Link to this callback
request(t, t)
@callback request(t(), Keyword.t()) :: {:ok, %{body: map(), status: pos_integer()}} | {:error, any()}
Functions
Link to this function
default_base_url()
@spec default_base_url() :: String.t()
The default API base URL (https://api.send.io).
Link to this function
delete(client, castable_module, path, body \\ %{}, opts \\ [])
Link to this function
get(client, castable_module, path, opts \\ [])
Link to this function
new(config)
@spec new(Sendio.config()) :: t()
Creates a new send.io client struct given a keyword list of config opts.
The base URL is taken from the :base_url option, then the :base_url set in
config :sendio, Sendio.Client, then the SENDIO_BASE_URL environment variable,
then https://api.send.io. A trailing slash is optional.
Link to this function
patch(client, castable_module, path, body \\ %{}, opts \\ [])
Link to this function