doofinder
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "doofinder", | ||
"description": "Javascript Library for Doofinder Search API", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"main": "dist/doofinder.js", | ||
@@ -6,0 +6,0 @@ "authors": [ |
@@ -306,2 +306,33 @@ | ||
/* | ||
This method calls to /session | ||
service for accounting the | ||
sessions in a searchengine | ||
@api public | ||
*/ | ||
Client.prototype.session = function(callback) { | ||
var headers, options, req; | ||
if (callback == null) { | ||
callback = function() {}; | ||
} | ||
headers = {}; | ||
if (this.apiKey) { | ||
headers['api token'] = this.apiKey; | ||
} | ||
options = { | ||
host: this.url, | ||
path: "/" + this.version + "/session/" + this.hashid + "/", | ||
headers: headers | ||
}; | ||
if (this.url.split(':').length > 1) { | ||
options.host = this.url.split(':')[0]; | ||
options.port = this.url.split(':')[1]; | ||
} | ||
req = httpLib.request(options, this.__processResponse(callback)); | ||
return req.end(); | ||
}; | ||
/* | ||
This method calls to /hit | ||
@@ -308,0 +339,0 @@ service for accounting the |
@@ -48,3 +48,3 @@ | ||
this.status = $.extend(true, {}, { | ||
params: this.searchParams | ||
params: $.extend(true, {}, this.searchParams) | ||
}); | ||
@@ -128,3 +128,3 @@ this.reset(); | ||
this.status.params.query = query; | ||
this.status.params.filters = $.extend(true, {}, this.searchParams.filters || {}); | ||
this.status.params.filters = $.extend(true, {}, this.searchParams.filters || {}, params.filters); | ||
this.status.params.query_counter = queryCounter; | ||
@@ -275,3 +275,3 @@ if (!this.searchParams.query_name) { | ||
this.status = { | ||
params: this.searchParams, | ||
params: $.extend(true, {}, this.searchParams), | ||
currentPage: 0, | ||
@@ -360,2 +360,13 @@ firstQueryTriggered: false, | ||
/* | ||
session | ||
Sends a session register to session logs. | ||
*/ | ||
Controller.prototype.session = function(callback) { | ||
return this.client.session(callback); | ||
}; | ||
/* | ||
hit | ||
@@ -362,0 +373,0 @@ |
(function() { | ||
module.exports = { | ||
version: "3.0.0", | ||
version: "3.0.1", | ||
Client: require("./client"), | ||
@@ -5,0 +5,0 @@ Mustache: require("mustache"), |
{ | ||
"name": "doofinder", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Javascript Library for Doofinder Search API", | ||
@@ -5,0 +5,0 @@ "main": "lib/doofinder.js", |
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
86747
25
1892