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
Current section
Files
lib/gen_template_api_client.ex
defmodule Mix.Gen.Template.ApiClient do
@moduledoc File.read!(Path.join([__DIR__, "../README.md"]))
use MixTemplates,
name: :api_client,
short_desc: "Template for creating REST API client wrappers in Elixir",
source_dir: "../template",
options: [
app: [
to: :app,
required: false,
takes: "app_name",
desc: "sets the application name to «app_name»"
],
application: [ same_as: :app ],
module: [
to: :project_name_camel_case,
required: false,
takes: "«project_name»",
desc: "sets the name of the module to «project_name»"
]
]
end