Spatio.Connection (spatio_sdk v0.0.2)
Handle Tesla connections for Spatio.
Additional middleware can be set in the compile-time or runtime configuration:
config :tesla, Spatio.Connection,
base_url: "https://api.spatio.app",
adapter: Tesla.Adapter.HackneyThe default base URL can also be set as:
config :spatio_sdk,
:base_url, "https://api.spatio.app"
Summary
Functions
Returns the default adapter for this API.
Returns fully configured middleware for passing to Tesla.client/2.
Configure a Spatio client.
Forward requests to Tesla.
Types
The list of options that can be passed to new/1.
base_url: Overrides the base URL on a per-client basis.user_agent: Overrides the User-Agent header.bearer_token: A bearer token for bearer authentication.
Functions
Returns the default adapter for this API.
@spec middleware(options()) :: [Tesla.Client.middleware()]
Returns fully configured middleware for passing to Tesla.client/2.
@spec new(options()) :: Tesla.Env.client()
Configure a Spatio client.
Parameters
options: an optional keyword list of Spatio.Connection.options.
Returns
Tesla.Env.client
@spec request(Tesla.Client.t(), [Tesla.option()]) :: Tesla.Env.result()
Forward requests to Tesla.