Skip to content

Commit

Permalink
Merge branch 'master' of github.com:brainflake/node-hubspot
Browse files Browse the repository at this point in the history
  • Loading branch information
brainflake committed Jan 21, 2016
2 parents 5472a09 + c139734 commit d8df2eb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,19 @@ function Client() {
};
sendRequest(call, cb);
},
getOne: function(id, cb) {
getOne: function(id, appId, cb) {
if (!id || typeof id === "function") { return cb(new Error("id parameter must be provided.")); }
if (typeof appId === "function") { cb = appId; appId = null; }

var call = {
method: 'GET',
url: self.baseUrl + '/email/public/v1/campaigns/' + id
};
if (appId) {
call.qs = {
appId: appId
}
}
sendRequest(call, cb);
},
tracking: campaignTracking
Expand Down Expand Up @@ -162,6 +169,7 @@ function Client() {
} catch (e) {
console.log(e);
console.log('error parsing response');
return cb(new Error(data)); // sometimes errors are returned as strings.
}
}
//if (data.error) { return cb(new Error(data.error)); }
Expand Down

0 comments on commit d8df2eb

Please sign in to comment.