资源说明:Node.js client for the Constant Contact API
## cc-client
#### Node.js wrapper for the Constant Contact API
### Installation
```bash
npm install cc-client
```
### Basic Use
```javascript
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('kitty@catworld.com', 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('nyan@cat.com', 'ACTION_BY_CUSTOMER', 1, function (err, obj) {
console.dir(obj);
});
```
### To Test
```bash
node test/index.js --apikey APIKEY --user USERNAME --pass PASSWORD
```
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。
English
