amazon-ppc-api
Advanced tools
Comparing version 1.0.17 to 1.1.1
@@ -127,5 +127,10 @@ const querystring = require("querystring"); | ||
} | ||
getCampaign(campaignId) { | ||
return this.apiRequest(`v2/sp/campaigns/${campaignId}`, null, "GET"); | ||
getCampaign(baseEndpoint, campaignId, isExtended = false) { | ||
const resource = isExtended ? "campaigns/extended/" : "campaigns/"; | ||
const endpoint = `${baseEndpoint}/${resource}${campaignId}`; | ||
return this.apiRequest(endpoint, null, "GET"); | ||
} | ||
getCampaignEx(campaignId) { | ||
@@ -499,5 +504,4 @@ return this.apiRequest( | ||
if (this.options.profileId) { | ||
requestOptions.headers[ | ||
"Amazon-Advertising-API-Scope" | ||
] = this.options.profileId; | ||
requestOptions.headers["Amazon-Advertising-API-Scope"] = | ||
this.options.profileId; | ||
} | ||
@@ -570,5 +574,4 @@ | ||
if (this.options.profileId) { | ||
requestOptions.headers[ | ||
"Amazon-Advertising-API-Scope" | ||
] = this.options.profileId; | ||
requestOptions.headers["Amazon-Advertising-API-Scope"] = | ||
this.options.profileId; | ||
} | ||
@@ -575,0 +578,0 @@ |
{ | ||
"name": "amazon-ppc-api", | ||
"version": "1.0.17", | ||
"version": "1.1.1", | ||
"description": "This class helps you interfacing the Amazon Advertising API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
49526
4
574