Comparing version 0.4.4 to 0.4.5
@@ -13,3 +13,3 @@ var request = require('./request'); | ||
api.exportDownloadPackage = function (args) { | ||
return this.request('GET', '/etc/creativeExchange/export/api.package.zip', args); | ||
return this.request('GET', '/etc/creativeExchange/export/api.package.zip', args, 'text'); | ||
}; | ||
@@ -38,3 +38,3 @@ | ||
api.importDownloadPackage = function (args) { | ||
return this.request('GET', '/etc/creativeExchange/import/api.package.zip', args); | ||
return this.request('GET', '/etc/creativeExchange/import/api.package.zip', args, 'text'); | ||
}; | ||
@@ -41,0 +41,0 @@ |
@@ -16,3 +16,3 @@ var api = require('./api'); | ||
CrEx.prototype.request = function(method, url, args) { | ||
CrEx.prototype.request = function(method, url, args, ret) { | ||
var req = null; | ||
@@ -19,0 +19,0 @@ url = this.getUrl() + url; |
var request = require('superagent'); | ||
var doGet = function (url, args) { | ||
var doGet = function (url, args, ret) { | ||
return new Promise(function (resolve, reject) { | ||
@@ -11,3 +11,3 @@ request | ||
if (err) reject(err); | ||
resolve(res.body); | ||
resolve(ret === 'text' ? res.text : res.body); | ||
}); | ||
@@ -14,0 +14,0 @@ }); |
{ | ||
"name": "crex", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"description": "Creative Exchange SDK for Javascript", | ||
@@ -5,0 +5,0 @@ "author": "Mateusz Luczak <mateusz.luczak@outlook.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16729