amazon-ppc-api
Advanced tools
Comparing version 1.4.3 to 1.5.0
@@ -286,3 +286,3 @@ const querystring = require('querystring'); | ||
async getReport(reportId) { | ||
async getReport(reportId, raw = false) { | ||
if (!reportId) { | ||
@@ -298,3 +298,5 @@ throw new Error('No valid reportId'); | ||
if (reportRequest.status === 'SUCCESS') { | ||
var result = await this.download(reportRequest.location, true); | ||
var result = await this.download(reportRequest.location, true, 2, raw); | ||
if (raw) return result; | ||
return Array.isArray(result) ? result : JSONbig.parse(zlib.gunzipSync(result).toString()); | ||
@@ -301,0 +303,0 @@ } else if (reportRequest.status === 'FAILURE') { |
{ | ||
"name": "amazon-ppc-api", | ||
"version": "1.4.3", | ||
"version": "1.5.0", | ||
"description": "This class helps you interfacing the Amazon Advertising API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
78153
932