Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:MadKudu/node-hubspot
Browse files Browse the repository at this point in the history
  • Loading branch information
pcothenet committed Aug 28, 2019
2 parents f1279c2 + 9ca4bdc commit ba9b112
Show file tree
Hide file tree
Showing 11 changed files with 1,607 additions and 1,393 deletions.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Client extends EventEmitter {
typeof options.maxUsePercent !== 'undefined'
? options.maxUsePercent
: MAX_USE_PERCENT_DEFAULT
this.baseUrl = options.baseUrl || 'http://api.hubapi.com'
this.baseUrl = options.baseUrl || 'https://api.hubapi.com'
this.apiTimeout = options.timeout || API_TIMEOUT
this.apiCalls = 0
this.on('apiCall', params => {
Expand Down
4 changes: 2 additions & 2 deletions lib/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ class Contact {

merge(primayVid, secondaryVid) {
const data = {
vidToMerge: secondaryVid
vidToMerge: secondaryVid,
}
return this.client._request({
method: 'POST',
path: '/contacts/v1/contact/merge-vids/' + primayVid ,
path: '/contacts/v1/contact/merge-vids/' + primayVid,
body: data,
})
}
Expand Down
46 changes: 23 additions & 23 deletions lib/owner.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
class Owner {
constructor(client) {
this.client = client
}

get(options) {
return this.client._request({
method: 'GET',
path: '/owners/v2/owners',
qs: options,
})
}

getById(id, options) {
return this.client._request({
method: 'GET',
path: '/owners/v2/owners/' + id,
qs: options,
})
}
}

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

get(options) {
return this.client._request({
method: 'GET',
path: '/owners/v2/owners',
qs: options,
})
}

getById(id, options) {
return this.client._request({
method: 'GET',
path: '/owners/v2/owners/' + id,
qs: options,
})
}
}

module.exports = Owner
2 changes: 1 addition & 1 deletion lib/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Pipeline {
getById(id) {
return this.client._request({
method: 'GET',
path: '/deals/v1/pipelines/' + id
path: '/deals/v1/pipelines/' + id,
})
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Timeline {
}

createEventType(applicationId, userId, data) {
data['applicationId'] = data['applicationId'] || applicationId
data.applicationId = data.applicationId || applicationId
const parameters = {
method: 'POST',
path: `/integrations/v1/${applicationId}/timeline/event-types?userId=${userId}`,
Expand All @@ -16,7 +16,7 @@ class Timeline {
}

updateEventType(applicationId, eventTypeId, data) {
data['applicationId'] = data['applicationId'] || applicationId
data.applicationId = data.applicationId || applicationId
const parameters = {
method: 'PUT',
path: `/integrations/v1/${applicationId}/timeline/event-types/${eventTypeId}`,
Expand All @@ -37,7 +37,7 @@ class Timeline {
}

updateEventTypeProperty(applicationId, eventTypeId, propertyId, data) {
data['id'] = data['id'] || propertyId
data.id = data.id || propertyId
const parameters = {
method: 'PUT',
path: `/integrations/v1/${applicationId}/timeline/event-types/${eventTypeId}/properties`,
Expand Down
Loading

0 comments on commit ba9b112

Please sign in to comment.