Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
search (term, start, ,rows, options, callback)


Parameters

ParameterDescriptionData TypeMandatory
termsThe query typed by the userStringYes
startThis parameter is used to paginate results from a queryIntegerNo
rowsThis parameter is used to paginate results from a queryIntegerNo
optionsObject that may contain information about filters and other required data for example: scope, user and sessionObjectNo
callbackFunction that will be executed after sending dataFunctionNo

Notes:

  • Additional parameters should be included into the options object. The list of parameters that can be included into the options parameter can be checked visiting the Search section of SEARCH REST API
  • To view the format of the JSON result, visit also the Search section of SEARCH REST API

...

Code Block
languagejs
var options = {
    lang:'en',
	scope:'desktop',
	user:'8212e2d6-fcbd-4879-9878-b06299ee785e',
	session: '3087bd26-2e69-4e84-84c3-e130e06e4888'
}
    
empathySearch.search('term',1,10, options, function(data){
    //the data object will contain search results and top trends
    alert('test');
});

...