campaignmonitor
v1.0.14
Published
Wrapper for campaign monitor api
Downloads
8
Maintainers
Readme
Campaign Monitor API wrapper
Universal javascript wrapper for campaign monitor api
Supported platforms
Compatible with node, webpack, and browserify
Getting Started
$ 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)
Options
apiKey
API key used for campaign monitor authentication - campaign monitor docs
API
Subscribers
Uses Campaign Monitor subscribers API
addSubscriber
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)
Development
Running tests
To run the full suite, run
npm test
Other commands
npm start
Runs build, test, and lint watchers
npm run tdd
Run test watcher
npm run lint
Run linter
npm run build
Builds the production assets suitable for release
npm run release
Builds, git tags release, and publishes to npm
CI/CD
Releases
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