Skip to content

pearlshare/mailchimp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

Mailchimp client

The mailchimp API is relatively straight forward so rather than a huge client library this is a simple wrapper which lets you specify the url and simply add the auth and does the request.

Supports Mailchimp API 3.0 or greater

Usage

First create a client with the appropriate options you require.

    var Mailchimp = require('mailchimp-client');

    var client = new Mailchimp(apiKey: 'xxx', version: "3.0");

Then perform the action you require. See the Mailchimp documentation for endpoint and param details.

    client.post('lists/<listId>/subscribe', {email_address: '[email protected]', status: 'subscribed'}, function(err, member){
        console.log(member); // {email: "email@example.com", euid: 'yyyyy', leid: 'yyyyyy'}
    });

Note: If no callback is passed an A+ promise is returned

About

Very minimalistic wrapper around the Mailchimp API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •