Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-constantcontact

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-constantcontact

Constant Contact v2 API client for Node.js

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-constantcontact

Dependency Status Download Status Sponsor on GitHub

Constant Contact v2 API client for Node.js

Install

$ npm install node-constantcontact --save

Usage

Setup

const ConstantContact = require('node-constantcontact');

const cc = new ConstantContact({
  apiKey: '',
  accessToken: ''
});

Get list of email campaigns

let req = cc.campaigns.find({ email: 'some.person@some-domain.com' });

req
  .catch((err) => {})
  .then((result) => {});

Search for existing contact

let req = cc.contacts.find({ email: 'test@example.org' });

req
  .catch((err) => {})
  .then((result) => {});

Add new contact

let contacts = [
  // array of contact objects - see
  // https://developer.constantcontact.com/docs/contacts-api/contacts-collection.html?method=POST
];

let req = cc.contacts.create(contacts, { action_by: 'ACTION_BY_OWNER' });

req
  .catch((err) => {})
  .then((result) => {});

Update existing contact

let req = cc.contacts.save(contact, { action_by: 'ACTION_BY_OWNER '});

req
  .catch((err) => {})
  .then((result) => {});

Advanced Usage

cc.client

Returns the internal instance of purest configured for Constant Contact.

let req = cc.client.get('activities').qs({ status: 'ERROR' }).request();

req
  .catch((err) => {})
  .then((result) => {});

cc.paginate(requestPromise, onPageLoad, onError, onEnd)

Follows the pagination links in a request to load each page sequentially.

cc.paginate(
  cc.contacts.find(),
  (page) => {},
  (err) => {},
  () => {}
);

cc.bulkWait(id, interval)

Waits for a bulk operation to complete.

Constant Contact API documentation

Keywords

FAQs

Package last updated on 12 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc