ExCrowdin.Config (ex_crowdin v0.1.2)
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
access_token()
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, []}
json_library()
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
project_id()
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, []}
resolve(key, default \\ nil)
Specs
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.