2017-04-19 15:14:01 -04:00
|
|
|
defmodule Hunter.Config do
|
2019-03-19 13:18:34 -04:00
|
|
|
@moduledoc """
|
|
|
|
Hunter configuration.
|
|
|
|
"""
|
2017-04-19 15:14:01 -04:00
|
|
|
|
2019-03-19 12:02:33 -04:00
|
|
|
def hunter_api do
|
2019-03-19 13:18:34 -04:00
|
|
|
Application.get_env(:hunter, :hunter_api, Hunter.Api.HTTPClient)
|
2017-04-19 15:14:01 -04:00
|
|
|
end
|
2017-04-20 18:44:00 -04:00
|
|
|
|
2019-03-19 12:02:33 -04:00
|
|
|
def api_base_url do
|
2019-03-19 13:18:34 -04:00
|
|
|
Application.get_env(:hunter, :api_base_url, "https://mastodon.social")
|
2017-04-20 18:44:00 -04:00
|
|
|
end
|
|
|
|
|
2019-03-19 12:02:33 -04:00
|
|
|
def home do
|
2017-04-20 18:44:00 -04:00
|
|
|
Path.expand(System.get_env("HUNTER_HOME") || "~/.hunter")
|
|
|
|
end
|
2019-03-19 14:16:09 -04:00
|
|
|
|
|
|
|
def http_options do
|
|
|
|
Application.get_env(:hunter, :http_options, [])
|
|
|
|
end
|
2017-04-19 15:14:01 -04:00
|
|
|
end
|