# yocto-mailchimp

> Mailchimp utility wrapper to call mailchimp api

Latest version **1.0.1** (published 2016-12-01) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install yocto-mailchimp
pnpm add yocto-mailchimp
yarn add yocto-mailchimp
bun add yocto-mailchimp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-12-01 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.3.1 |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yocto SAS |
| Maintainers | yocto |
| Keywords | mailchimp, wrapper |

## Links

- npm: https://www.npmjs.com/package/yocto-mailchimp
- Repository: https://github.com/yoctore/yocto-mailchimp
- Homepage: https://github.com/yoctore/yocto-mailchimp#readme
- Issues: https://github.com/yoctore/yocto-mailchimp/issues
- npm.io page: https://npm.io/package/yocto-mailchimp

## Dependencies (6)

- [q](https://npm.io/package/q.md) ^1.4.1
- [joi](https://npm.io/package/joi.md) ^10.0.1
- [lodash](https://npm.io/package/lodash.md) ^4.14.0
- [yocto-utils](https://npm.io/package/yocto-utils.md) ^1.2.8
- [yocto-logger](https://npm.io/package/yocto-logger.md) ^1.1.6
- [mailchimp-api](https://npm.io/package/mailchimp-api.md) ^2.0.7

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-12-01
- 1.0.0 — 2016-08-19

## README

[![NPM](https://nodei.co/npm/yocto-mailchimp.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/yocto-mailchimp/)

![alt text](https://david-dm.org/yoctore/yocto-mailchimp.svg "Dependencies Status")
[![Code Climate](https://codeclimate.com/github/yoctore/yocto-mailchimp/badges/gpa.svg)](https://codeclimate.com/github/yoctore/yocto-mailchimp)
[![Test Coverage](https://codeclimate.com/github/yoctore/yocto-mailchimp/badges/coverage.svg)](https://codeclimate.com/github/yoctore/yocto-mailchimp/coverage)
[![Issue Count](https://codeclimate.com/github/yoctore/yocto-mailchimp/badges/issue_count.svg)](https://codeclimate.com/github/yoctore/yocto-mailchimp)
[![Build Status](https://travis-ci.org/yoctore/yocto-mailchimp.svg?branch=master)](https://travis-ci.org/yoctore/yocto-mailchimp)

## Overview

This module is a part of yocto node modules for NodeJS.

Please see [our NPM repository](https://www.npmjs.com/~yocto) for complete list of available tools (completed day after day).

This module provide a simple config validator tools for your node app.

## Motivation

Create an easy and ready to use connector & model builder based on mongoose.

## Mailchimp APi version

This module implements the v2.0 of the mailchimp API.

## Available Methods

### Configuration of module

```javascript

var logger    = require('yocto-logger');
var mailchimp = require('yocto-mailchimp')(logger);

// Multiple Mailchimp account can be configured
mailchimp.loadConfig([
  {
    // Name of config
    name    : 'myAccount',
    // Private token
    token   : 'aaa4545521-us14',
    // Version of Mailchimp Api to use
    version : 'v2.0',
    // Configuration of mailing list that will be used
    list : [
      {
        // Name of the mailinglist into Mailchimp
        name        : 'test',
        // Id of the list
        id          : 'aaa',
        // Enable doubleOptin or not
        doubleOptin : false
      }
    ]
  }
]).then(function (value) {
  console.log('load config success')
}.bind(this)).catch(function (error) {
  console.log('load config failed');
});
```

### subscribe

This method permit to subscribe an user to mailing list

>Before use subscribe(), your module should be correctly initialized

```javascript

mailchimp.subscribe({
  // The account name defined in config to use
  accountName : 'myAccount',
  // The mailing list name
  listName    : 'test',
  // The email to add
  email       : 'toataao@toto.fr'
]).then(function (value) {
  console.log('load config success')
}.bind(this)).catch(function (error) {
  console.log('load config failed');
});
```

---
_Source: https://npm.io/package/yocto-mailchimp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
