CompaniesHouse.Config (CompaniesHouse v0.2.0)
View SourceMethods to parse and modify configurations.
Summary
Functions
Gets the API key from configuration. Raises ConfigError if API key is not configured.
Gets the environment from configuration. Default is :sandbox if not explicitly configured. Raises ConfigError if environment is invalid.
Gets the key value from the environment config.
Puts a new key value to the configuration.
Raise a ConfigError exception.
Types
@type t() :: Keyword.t()
Functions
@spec api_key() :: String.t()
Gets the API key from configuration. Raises ConfigError if API key is not configured.
@spec environment() :: :sandbox | :live
Gets the environment from configuration. Default is :sandbox if not explicitly configured. Raises ConfigError if environment is invalid.
Gets the key value from the environment config.
Puts a new key value to the configuration.
Raise a ConfigError exception.