0.1.1 • Published 10 years ago

mailchimp-export v0.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
10 years ago

mailchimp-export

Skip the memory! Handle large Mailchimp Export API datasets with Streams.

Installation

$ npm install mailchimp-export

Usage

var fs = require('fs');
var api = require('mailchimp-export');

api.list({ id: 'a1b2c3', apikey: 'f9e8d7-us3' })
	.pipe(fs.createWriteStream('./output.json'));

api.options.apikey = 'f9e8d7-us3';

api.ecommOrders().pipe(res);
api.campaignSubscriberActivity({ id: '010203' }).pipe(res);

Defaults

api.options = {
	https: true,
	apikey: '',
	streamMode: 'stringified', // 'json'

	host: 'api.mailchimp.com',
	path: '/export/1.0/',
	method: 'POST',
}

API

Every method returns a ReadableStream and requires an apikey.

api.list(options || api.options)

  • apikey, id, status, segment, since, hashed.

api.ecommOrders(options || api.options)

  • apikey, since.

api.campaignSubscriberActivity(options || api.options)

  • apikey, id, since, include_empty.
0.1.1

10 years ago

0.1.0

10 years ago