Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

addsearch-js-client

Package Overview
Dependencies
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

addsearch-js-client - npm Package Compare versions

Comparing version 0.8.10 to 0.8.11

2

package.json
{
"name": "addsearch-js-client",
"version": "0.8.10",
"version": "0.8.11",
"description": "AddSearch API JavaScript client",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -416,3 +416,3 @@ # AddSearch Search API Client for JavaScript

// Set API hostname (e.g. for dedicated environments)
client.setApiHostname('api.addsearch.com');
client.setApiHostname('api.addsearch.com', option);
```

@@ -419,0 +419,0 @@

@@ -149,2 +149,3 @@ 'use strict';

}
api = 'https://' + apiHostname + '/v1/' + apiPath + '/' + sitekey + '?term=' + kw + qs;
}

@@ -158,2 +159,3 @@

kw = settings.suggestionsPrefix;
api = 'https://' + apiHostname + '/v1/' + apiPath + '/' + sitekey + '?term=' + kw + qs;
}

@@ -167,14 +169,16 @@

kw = settings.autocomplete.prefix;
api = 'https://' + apiHostname + '/v1/' + apiPath + '/' + sitekey + '?term=' + kw + qs;
}
else if (type === 'recommend') {
apiPath = 'recommendations';
qs = settingToQueryParam(recommendOptions.itemId, 'itemId');
if (recommendOptions.type === 'RELATED_ITEMS') {
qs = settingToQueryParam(recommendOptions.itemId, 'itemId');
apiPath = 'recommendations/index/' + sitekey + '/block/' + recommendOptions.blockId + '?' + qs;
} else if (recommendOptions.type === 'FREQUENTLY_BOUGHT_TOGETHER') {
qs = settingToQueryParam(recommendOptions.itemId, 'itemId');
apiPath = 'recommendations/' + sitekey + '?configurationKey=' + recommendOptions.configurationKey + qs;
}
api = 'https://' + apiHostname + '/v1/' + apiPath;
}
// Execute API call
api = type === 'recommend' ?
'https://' + apiHostname + '/v1/' + apiPath + '/' + sitekey + '?configurationKey=' + recommendOptions.configurationKey + qs :
'https://' + apiHostname + '/v1/' + apiPath + '/' + sitekey + '?term=' + kw + qs;
apiInstance.get(api)

@@ -181,0 +185,0 @@ .then(function(response) {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc