forked from MadKudu/node-hubspot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request MadKudu#170 from MadKudu/feature-integrations
feature: add integrations route to get account details & fix travis node 6
- Loading branch information
Showing
73 changed files
with
5,279 additions
and
5,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require('dotenv').config({ path: '.env' }) | ||
require('dotenv').config({ path: '.env' }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./lib/client') | ||
module.exports = require('./lib/client') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.