getdrip-api
A nodejs wrapper for drip v2 api.
Usage
var getdrip = require('getdripapi')(apiToken, accountId);
Supported APIs
.getAccounts
returns a list of accounts
Usage
getdrip.getAccounts(function(err, res, body){
// body contains account list
}
.getSubscribers
returns list of subscribers
Usage
getdrip.getSubscribers = function (cb) {
// returns list of subscribers
}
.getSubscriber
returns a single subscriber
Usage
getdrip.getSubscriber = function (subscriberId, function(err, res, body) {
// returns list of one subscriber
})
.createSubscriber
returns a subscriber
Usage
getdrip.createSubscriber(testEmail, {}, function(err, res, body) {
// returns list of the new subscriber
})
.getCampaigns
returns list of campgains
Usage
getdrip.getCampaigns = function (cb) {
// returns list of subscribers
}
.subscribeToCampaign
adds a subscriber to a campaign
Usage
getdrip.subscribeToCampaign(email, campaignId, {}, function(err, res, body) {
// returns list of subscribers added to the campaign
}
.createEvent
creates an event for a given subscriber
Usage
getdrip.createEvent = function (email, event, opts, function(err, res, body) {
// no body
}
.createTag
creates a tag for a given subscriber
Usage
getdrip.createEvent = function (email, tag, opts, function(err, res, body) {
// no body
}
License
MIT