README
Mailchimp Node.js Library
The Mailchimp API allows you to sync email activity and campaign stats with your database, manage lists/audiences, view and control automation workflows, and test calls and endpoints before pushing to production.
This Node.js library provides a simple wrapper implementation for the Mailchimp API that currently supports basic functionality around creating, editing and deleting members.
Installation
$ yarn add @nodepit/mailchimp
Usage
import { Mailchimp } from '@nodepit/mailchimp';
const yourApiKey = 'Your Mailchimp API key';
const yourListId = 'Your Mailchimp list id';
const mailChimp = new Mailchimp(yourApiKey);
await mailChimp.createMember(yourListId, 'mail@example.com', {
status: MemberStatus.SUBSCRIBED,
merge_fields: { FNAME: 'Daniel' },
// more parameters
});
Development
Install NPM dependencies with yarn
.
To execute the tests, run the test
task.
For the best development experience, make sure that your editor supports ESLint, markdownlint and EditorConfig.
Releasing to NPM
Commit all changes and run the following:
$ npm login
$ npm version <update_type>
$ npm publish --access public
… where <update_type>
is one of patch
, minor
, or major
. This will update the package.json
, and create a tagged Git commit with the version number.
Contributing
Pull requests are very welcome. Feel free to discuss bugs or new features by opening a new issue.
Copyright nodepit.com, 2018 – 2022.