View Source PlacetelAPI.Connection (placetel_api v2.0.0)
Handle Tesla connections for PlacetelAPI.
Additional middleware can be set in the compile-time or runtime configuration:
config :tesla, PlacetelAPI.Connection,
base_url: "https://api.placetel.de/v2",
adapter: Tesla.Adapter.Hackney
The default base URL can also be set as:
config :placetel_api,
:base_url, "https://api.placetel.de/v2"
Link to this section Summary
Functions
Returns the default adapter for this API.
Returns fully configured middleware for passing to Tesla.client/2.
Configure a client with no authentication.
Configure a client that may have authentication.
Forward requests to Tesla.
Link to this section 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.
Link to this section 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() :: Tesla.Env.client()
Configure a client with no authentication.
returns
Returns
Tesla.Env.client
@spec new(options()) :: Tesla.Env.client()
Configure a client that may have authentication.
parameters
Parameters
options
: a keyword list where to override the :api_key per connection instead of using the global configured one.
returns
Returns
Tesla.Env.client
@spec request(Tesla.Client.t(), [Tesla.option()]) :: Tesla.Env.result()
Forward requests to Tesla.