This is a basic Elixir wrapper for version 3 of the MailChimp API.
First, add MailChimp lib to your mix.exs
dependencies:
def deps do
[{:mailchimp, "~> 0.1.0"}]
end
and run $ mix deps.get
Put your API key in your config.exs
file:
config :mailchimp,
api_key: "your api-us10"
or
Application.put_env(:mailchimp, :api_key, "your apikey-us12")
Mailchimp.Account.get!()
Mailchimp.Account.get! |> Mailchimp.Account.lists!
Mailchimp.List.create_member(list, "test@email.com", "subscribed", %{}, %{})
Mailchimp.Campaign.create!(:regular)