ExCrowdin.Config (ex_crowdin v0.2.3)

Utility that handles interaction with the application's configuration

Link to this section Summary

Functions

In config.exs, use a string, a function or a tuple

In config.exs your implicit or expicit configuration is

In config.exs, use a string, a function or a tuple

Resolves the given key from the application's configuration returning the wrapped expanded value. If the value was a function it get's evaluated, if the value is a touple of three elements it gets applied.

Link to this section Functions

In config.exs, use a string, a function or a tuple:

config :ex_crowdin, access_token: System.get_env("CROWDIN_ACCESS_TOKEN")

or:

config :ex_crowdin, access_token: {:system, "CROWDIN_ACCESS_TOKEN"}

or:

config :ex_crowdin, access_token: {MyApp.Config, :crowdin_access_token, []}

Specs

json_library() :: module()

In config.exs your implicit or expicit configuration is:

config ex_:crowdin, json_library: Poison # defaults to Jason but can be configured to Poison

In config.exs, use a string, a function or a tuple:

config :ex_crowdin, project_id: System.get_env("CROWDIN_PROJECT_ID")

or:

config :ex_crowdin, project_id: {:system, "CROWDIN_PROJECT_ID"}

or:

config :ex_crowdin, project_id: {MyApp.Config, :crowdin_project_id, []}
Link to this function

resolve(key, default \\ nil)

Specs

resolve(atom(), any()) :: any()

Resolves the given key from the application's configuration returning the wrapped expanded value. If the value was a function it get's evaluated, if the value is a touple of three elements it gets applied.