Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
/ node-mailchimp Public archive

Node.js client for managing Mailchimp subscriptions

License

Notifications You must be signed in to change notification settings

NodePit/node-mailchimp

Repository files navigation

Mailchimp Node.js Library

npm version

⚠️ Deprecation note

We no longer use Mailchimp, and so we will no longer maintain this module.

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, '[email protected]', {
  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.

About

Node.js client for managing Mailchimp subscriptions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •