ExKeyCDN (exkeycdn v0.0.1)
A native ExKeyCDN REST API client in Elixir. Based on Braintree Elixir client: https://github.com/sorentwo/braintree-elixir
For general reference please see: https://www.keycdn.com/api
Link to this section Summary
Link to this section Functions
Link to this function
get_env(key, default \\ nil)
Specs
Convenience function for retrieving ExKeyCDN specfic environment values, but will raise an exception if values are missing.
Example
iex> ExKeyCDN.get_env(:random_value)
** (ExKeyCDN.ConfigError) missing config for :random_value
iex> ExKeyCDN.get_env(:random_value, "random")
"random"
iex> Application.put_env(:exkeycdn, :random_value, "not-random")
...> value = ExKeyCDN.get_env(:random_value)
...> Application.delete_env(:exkeycdn, :random_value)
...> value
"not-random"
iex> System.put_env("RANDOM", "not-random")
...> Application.put_env(:exkeycdn, :system_value, {:system, "RANDOM"})
...> value = ExKeyCDN.get_env(:system_value)
...> System.delete_env("RANDOM")
...> value
"not-random"
Link to this function
put_env(key, value)
Specs
Convenience function for setting ExKeyCDN
application environment
variables.
Example
iex> ExKeyCDN.put_env(:thingy, "thing")
...> ExKeyCDN.get_env(:thingy)
"thing"