Current section
Files
Jump to
Current section
Files
README.md
# MailChimp[](https://hex.pm/packages/mailchimp)[](https://hexdocs.pm/mailchimp/)[](https://hex.pm/packages/mailchimp)[](https://github.com/duartejc/mailchimp/blob/master/LICENSE.md)[](https://github.com/duartejc/mailchimp/commits/master)This is a basic Elixir wrapper for version 3 of the MailChimp API.## InstallationFirst, add MailChimp lib to your `mix.exs` dependencies:```elixirdef deps do [ {:mailchimp, "~> 0.2.0"} ]end```and run `$ mix deps.get`## UsagePut your API key in your `config.exs` file:```elixirconfig :mailchimp, api_key: "your api-us10"```or```elixirApplication.put_env(:mailchimp, :api_key, "your apikey-us12")```### Getting Account Details```elixirMailchimp.Account.get!()```### Getting All Lists```elixirMailchimp.Account.get_all_lists!```### Adding a Member to a List```elixirMailchimp.List.create_member(list, "test@email.com", "subscribed", %{}, %{})```### Creating a new Campaign```elixirMailchimp.Campaign.create!(:regular)```## Copyright and LicenseCopyright (c) 2017 Jean DuarteThis work is free. You can redistribute it and/or modify it under theterms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.