1.0.2 • Published 6 years ago

mailchimp-v3-api v1.0.2

Weekly downloads
104
License
ISC
Repository
github
Last release
6 years ago

mailchimp v3 API

NPM Build Status

Just another Node module for Mailchimp API v3

As simple as possible for simple Mailchimp V3 API calls.

For more information see: http://developer.mailchimp.com/documentation/mailchimp/

Installation:

npm install mailchimp-v3-api --save

Usage:

note: You need a nodejs or iojs version that supports ES6

  • First include the Mailchimp-v3 script and add the key.
var MAILCHIMP_V3 = require('./mailchimp-v3-api.js');
var MAILCHIMP = new MAILCHIMP_V3({
  key: '[KEY]',       // mandatory, API key http://kb.mailchimp.com/accounts/management/about-api-keys
  debug: [boolean],   // optional, auto set to false
  location: [string]  // optional, one of Mailchimp locations: http://developer.mailchimp.com/status/ example: 'us12' 
});

Endpoints

All attributes that have GET methods attached can be called through the get(endpoint) function. Where the param is the endpoint. (endpoints overview: http://goo.gl/s0zf63)

Note: Always include the complete path, like '/lists' or '/lists/{list_id}/interest-categories'

Examples:

GET

MAILCHIMP
	.get('/lists')
	.then(function(response){
		console.log(response);
	})

POST

MAILCHIMP
	.post('/lists', { "some": "data"} )
	.then(function(response){
		console.log(response);
	})

PATCH

MAILCHIMP
	.patch('/lists', { "some": "data"} )
	.then(function(response){
		console.log(response);
	})

PUT

MAILCHIMP
	.put('/lists', { "some": "data"} )
	.then(function(response){
		console.log(response);
	})

DELETE

MAILCHIMP
	.delete('/lists', { "some": "data"} )
	.then(function(response){
		console.log(response);
	})

For delete() the data is optional

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago