View Source PorscheConnEx.Config (porsche_conn_ex v0.1.0)
Configures the region and behaviour of the API session.
Fields
language
(defaultde
) - a two-letter language codecountry
(defaultDE
) - a two-letter country codetimezone
(defaultEtc/UTC
) - a timezone identifierapi_url
(defaulthttps://api.porsche.com
) - the base URL to access the Porsche Connect APIhttp_options
(default[]
) - a list of options accepted byReq.new/1
Locales
The language
and country
fields, when put together, should form a valid locale name.
The chosen locale may affect various aspects of the API. The most obvious effect is to choose the units used (metric versus imperial).
The following locales are known to work:
de_DE
(Germany) - metric unitsen_US
(United States) - imperial units
The following locales are known to NOT work:
en_CA
(Canada)
When choosing an unsupported locale, the initial authentication will succeed,
but most other requests will fail with {:error, :not_found}
.
Note that this library was designed and tested using de_DE
(and also
defaults to this), on the assumption that German would be the most logical
locale for a German car. Some effort has been made to test against en_US
and imperial units as well, but there may still be bugs when working in
non-German locales.
Summary
Types
Functions
Creates a new configuration object.
opts
can be a Keyword
list, a Map
, or any other enumerable containing
key-value tuples.
It can also be an existing PorscheConnEx.Config
structure, which will be
returned verbatim.