Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duartejc/mailchimp
A basic Elixir wrapper for version 3 of the MailChimp API
https://github.com/duartejc/mailchimp
elixir mailchimp mailchimp-api
Last synced: 2 days ago
JSON representation
A basic Elixir wrapper for version 3 of the MailChimp API
- Host: GitHub
- URL: https://github.com/duartejc/mailchimp
- Owner: duartejc
- License: mit
- Created: 2015-05-13T01:11:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-03T23:40:53.000Z (7 months ago)
- Last Synced: 2025-01-02T07:07:44.861Z (9 days ago)
- Topics: elixir, mailchimp, mailchimp-api
- Language: Elixir
- Size: 643 KB
- Stars: 48
- Watchers: 5
- Forks: 56
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - A basic Elixir wrapper for version 3 of the MailChimp API. (Third Party APIs)
- fucking-awesome-elixir - mailchimp - A basic Elixir wrapper for version 3 of the MailChimp API. (Third Party APIs)
- awesome-elixir - mailchimp - A basic Elixir wrapper for version 3 of the MailChimp API. (Third Party APIs)
README
# MailChimp
[![Module Version](https://img.shields.io/hexpm/v/mailchimp.svg)](https://hex.pm/packages/mailchimp)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/mailchimp/)
[![Total Download](https://img.shields.io/hexpm/dt/mailchimp.svg)](https://hex.pm/packages/mailchimp)
[![License](https://img.shields.io/hexpm/l/mailchimp.svg)](https://github.com/duartejc/mailchimp/blob/master/LICENSE.md)
[![Last Updated](https://img.shields.io/github/last-commit/duartejc/mailchimp.svg)](https://github.com/duartejc/mailchimp/commits/master)This is a basic Elixir wrapper for version 3 of the MailChimp API.
## Installation
First, add MailChimp lib to your `mix.exs` dependencies:
```elixir
def deps do
[
{:mailchimp, "~> 0.2.0"}
]
end
```and run `$ mix deps.get`
## Usage
Put your API key in your `config.exs` file:
```elixir
config :mailchimp,
api_key: "your api-us10"
```or
```elixir
Application.put_env(:mailchimp, :api_key, "your apikey-us12")
```### Getting Account Details
```elixir
Mailchimp.Account.get!()
```### Getting All Lists
```elixir
Mailchimp.Account.get_all_lists!
```### Adding a Member to a List
```elixir
Mailchimp.List.create_member(list, "[email protected]", "subscribed", %{}, %{})
```### Creating a new Campaign
```elixir
Mailchimp.Campaign.create!(:regular)
```## Copyright and License
Copyright (c) 2017 Jean Duarte
This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.