Skip to content
forked from twined/ex_chimp

Minimal/basic Mailchimp API client.

License

Notifications You must be signed in to change notification settings

oddcamp/ex_chimp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExChimp

A simple, minimalistic Mailchimp client basically for just adding members to lists.

Installation

If available in Hex, the package can be installed as:

  1. Add ex_chimp to your list of dependencies in mix.exs:
def deps do
  [{:ex_chimp, "~> 0.0.5"}]
end

Usage

Add to your application's config:

config :ex_chimp, api_key: "yourapikeyhere-us12"

Get all lists on your account:

ExChimp.List.all()

Add a member to a list

# With merge fields
ExChimp.List.add_member(
  "your_list_id",
  :subscribed,
  "sub@email.com",
  %{"FULL_NAME" => "Full name"}
)

# With merge fields and gdpr switch
ExChimp.List.add_member(
  "your_list_id",
  :subscribed,
  "sub@email.com",
  %{"FULL_NAME" => "Full name"},
  %{"marketing_permissions" => [%{marketing_permission_id: "bb4ae547e5", enabled: true}]}
)

# Without
ExChimp.List.add_member("your_list_id", :subscribed, "sub@email.com")

Mix tasks

To show lists on your account:

$ mix exchimp.lists

About

Minimal/basic Mailchimp API client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%