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
template/$PROJECT_NAME$/lib/$PROJECT_NAME$/client.ex
defmodule <%= @project_name_camel_case %>.Client do
@moduledoc"""
Access service functionality through Elixir functions,
wrapping the underlying HTTP API calls.
This is where you will want to write your custom
code to access your API, and it is probably best
to make those calls through your API or Worker.
<%= @project_name_camel_case %>.Api.call/2
<%= @project_name_camel_case %>.Api.get/2
<%= @project_name_camel_case %>.Api.post/3
<%= @project_name_camel_case %>.Api.put/3
<%= @project_name_camel_case %>.Api.delete/3
"""
end