ExHerokuClient
An Elixir client for the Heroku API.
The API is generated at compile time via JSONHyperschema.ClientBuilder.
Installation
The package can be installed as:
-
Add
ex_heroku_clientto your list of dependencies inmix.exs:
def deps do
[{:ex_heroku_client, "~> 0.1.0"}]
end-
Ensure
ex_heroku_clientis started before your application:
def application do
[applications: [:ex_heroku_client]]
endAuthentication
Currently, this client does not offer a login function.
You'll need to go to your account page
and copy your API key to config/{env}.secret.exs:
use Mix.Config
secret = System.get_env("HEROKU_ACCESS_TOKEN")
config :ex_heroku_client, :api_config,
headers: ["Authorization": "Bearer #{secret}",
"Accept": "application/vnd.heroku+json; version=3"]