Skip to content

Commit

Permalink
Merge pull request MadKudu#170 from MadKudu/feature-integrations
Browse files Browse the repository at this point in the history
feature: add integrations route to get account details & fix travis node 6
  • Loading branch information
pcothenet authored Apr 24, 2019
2 parents 736beb8 + be20327 commit 4481221
Show file tree
Hide file tree
Showing 73 changed files with 5,279 additions and 5,394 deletions.
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
require('dotenv').config({ path: '.env' })
require('dotenv').config({ path: '.env' })
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./lib/client')
module.exports = require('./lib/client')
30 changes: 15 additions & 15 deletions lib/broadcast.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class Broadcast {
constructor(client) {
this.client = client
}

get(options) {
return this.client._request({
method: 'GET',
path: '/broadcast/v1/broadcasts',
qs: options,
})
}
}

module.exports = Broadcast
class Broadcast {
constructor(client) {
this.client = client
}

get(options) {
return this.client._request({
method: 'GET',
path: '/broadcast/v1/broadcasts',
qs: options,
})
}
}

module.exports = Broadcast
92 changes: 46 additions & 46 deletions lib/campaign.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
class Campaign {
constructor(client) {
this.client = client
}

get(options) {
return this.client._request({
method: 'GET',
path: '/email/public/v1/campaigns',
qs: options,
})
}

getById(options) {
return this.client._request({
method: 'GET',
path: '/email/public/v1/campaigns/by-id',
qs: options,
})
}

getOne(id) {
if (!id || typeof id === 'function') {
const error = new Error('id parameter must be provided.')
if (typeof id === 'function') {
id(error)
}
return Promise.reject(error)
}

return this.client._request({
method: 'GET',
path: '/email/public/v1/campaigns/' + id,
})
}

events(options) {
return this.client._request({
method: 'GET',
path: '/email/public/v1/events',
qs: options,
})
}
}

module.exports = Campaign
class Campaign {
constructor(client) {
this.client = client
}

get(options) {
return this.client._request({
method: 'GET',
path: '/email/public/v1/campaigns',
qs: options,
})
}

getById(options) {
return this.client._request({
method: 'GET',
path: '/email/public/v1/campaigns/by-id',
qs: options,
})
}

getOne(id) {
if (!id || typeof id === 'function') {
const error = new Error('id parameter must be provided.')
if (typeof id === 'function') {
id(error)
}
return Promise.reject(error)
}

return this.client._request({
method: 'GET',
path: '/email/public/v1/campaigns/' + id,
})
}

events(options) {
return this.client._request({
method: 'GET',
path: '/email/public/v1/events',
qs: options,
})
}
}

module.exports = Campaign
Loading

0 comments on commit 4481221

Please sign in to comment.