Skip to content

coders51/ex_chimp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExChimp

A simple, minimalistic Mailchimp client. Currently ExChimp only supports a few basic API calls.

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.1"}] end

Usage

Add to your application's config:

config :ex_chimp,
  api_key: "yourapikeyhere-us12"

Get all lists on your account:

ExChimp.List.all

Get all members on a list:

ExChimp.List.members("your_list_id")

Add a member to a list

# With merge fields
ExChimp.List.add_member("your_list_id", :subscribed, "[email protected]",
                        %{"FULL_NAME" => "Full name"})
# Without
ExChimp.List.add_member("your_list_id", :subscribed, "[email protected]")

Add a update member in a list

# With merge fields
ExChimp.List.update_member("your_list_id", "user_mailchimp_id", :subscribed, "[email protected]",
                        %{"FULL_NAME" => "Full name"})
# Without
ExChimp.List.update_member("your_list_id", "user_mailchimp_id", :subscribed, "[email protected]")

Delete a member from a list

ExChimp.List.delete_member("your_list_id", "user_mailchimp_id")

Mix tasks

To show lists on your account:

$ mix exchimp.lists

Todo

Tests.

About

Minimal/basic Mailchimp API client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%