Skip to content
/ mailchimp Public
forked from duartejc/mailchimp

A basic Elixir wrapper for version 3 of the MailChimp API

License

Notifications You must be signed in to change notification settings

pfcs/mailchimp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hex Version

This is a basic Elixir wrapper for version 3 of the MailChimp API.

Installation

First, add MailChimp lib to your mix.exs dependencies:

def deps do
  [{:mailchimp, "~> 0.0.7"}]
end

and run $ mix deps.get. Now, list the :mailchimp application as your application dependency:

def application do
  [applications: [:mailchimp]]
end

Usage

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")

Start a new process:

Mailchimp.start_link

Getting Account Details

Mailchimp.Account.get!()

Getting All Lists

Mailchimp.Account.get! |> Mailchimp.Account.lists!

Adding a Member to a List

Mailchimp.List.create_member(list, "[email protected]", :subscribed, %{}, %{})

Creating a new Campaign

Mailchimp.Campaign.create!(:regular)     

About

A basic Elixir wrapper for version 3 of the MailChimp API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%