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