Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "artifacia", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A javascript client to integrate visual recommendation feature from Artifacia API", | ||
@@ -5,0 +5,0 @@ "main": "src/artifacia.js", |
@@ -110,10 +110,7 @@ "use strict"; | ||
exports.get_visual_recommendation = function(prod_id, num, filters, callback){ | ||
exports.get_visual_recommendation = function(prod_id, num, filters = {}, callback){ | ||
// console.log(prod_id); | ||
var baseUrl = 'https://api.artifacia.com/v1/recommendation/similar/'+prod_id+'/'+num+'?'; | ||
for (var key in filters){ | ||
baseUrl = baseUrl+key+'='+filters[key]+'&' | ||
} | ||
var baseUrl = 'https://api.artifacia.com/v1/recommendation/similar/'+prod_id+'/'+num; | ||
var headers = { | ||
@@ -127,4 +124,5 @@ 'Content-Type' : 'application/json', | ||
headers: headers, | ||
method: 'GET', | ||
method: 'POST', | ||
json: true, | ||
body: {"filters":filters}, | ||
rejectUnauthorized: false | ||
@@ -131,0 +129,0 @@ }; |
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
11613
293
1