cc-client

v0.1.0
A node.js client for the Constant Contact API

cc-client

Node.js wrapper for the Constant Contact API

Installation

npm install cc-client

Basic Use

var client = require('cc-client')('APIKEY', 'USERNAME', 'PASSWORD');

// Get all contacts
client.all(function (err, obj) {
    console.dir(obj);
});

// Get one contact by id
client.one('1', function (err, obj) {
    console.dir(obj);
});

// Search for a contact by email address
client.search('[email protected]', function (err, obj) {
    console.dir(obj);
});

// Create a new contact with the source type of "ACTION_BY_CUSTOMER" and add it to list 1
client.create('[email protected]', 'ACTION_BY_CUSTOMER', 1, function (err, obj) {
    console.dir(obj);
});

To Test

node test/index.js --apikey APIKEY --user USERNAME --pass PASSWORD
npm i cc-client

Metadata

Downloads

Maintainers