Packages

A template for building API clients to 3rd party REST applications. This will generate templates for get, post functions. You then extend the project with convenience functions to access the API like it were just another Elixir lib.

Current section

Files

Jump to
gen_template_api_client template $PROJECT_NAME$ lib $PROJECT_NAME$ application.ex
Raw

template/$PROJECT_NAME$/lib/$PROJECT_NAME$/application.ex

defmodule <%= @project_name_camel_case %>.Application do
@moduledoc false
# See http://elixir-lang.org/docs/stable/elixir/Application.html
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
worker(<%= @project_name_camel_case %>.Worker, []),
]
opts = [
strategy: :one_for_one,
name: <%= @project_name_camel_case %>.Supervisor
]
Supervisor.start_link(children, opts)
end
end