Universal javascript wrapper for campaign monitor api
Compatible with node, webpack, and browserify
$ npm i --save campaignmonitor
import campaignMonitor from 'campaignmonitor'
You must initialize the object with options before using.
import campaignMonitor from 'campaignmonitor'
const api = campaignMonitor(options)
API key used for campaign monitor authentication - campaign monitor docs
Uses Campaign Monitor subscribers API
Adds subscriber to specified list
Params
-
{string} - list ID - API Subscriber List ID from Campaign Monitor
-
{object} - request body - should map to fields in subscriber api docs
Returns
- Email address of user that was subscribed (see CM docs for more)
To run the full suite, run
npm test
Runs build, test, and lint watchers
Run test watcher
Run linter
Builds the production assets suitable for release
Builds, git tags release, and publishes to npm
Every commit to master defaults to a patch bump. If it needs to be a minor or major, ENSURE YOU DO THE FOLLOWING:
If you would like to create a release, add the following to the merge commit message when you merge a PR:
release v+<bump type>
Where <bump type>
is one of:
- major
- minor
- patch (default)
This will:
- Bump version in package.json and commit back to master
- Git tag that newly created commit with the new version
- Publish to npm