Javascript Search Library: generalTopclicked

Overview

Instructions to use the search service to retrieve just top clicked without adding a term (general top clicked).

Step-by-step guide

You can search using the generalTopclicked function.

generalTopclicked (start, rows, options, callback)


Parameters

ParameterDescriptionData TypeMandatory
startThis parameter is used to paginate results from a queryIntegerNo
rowsThis parameter is used to paginate results from a queryIntegerNo
options

Object that must contain information about the language used: E.g { lang = en }

Also may contain information about filters and other required data for example: scope

ObjectYes
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 samples

var options = {
    lang:'en',
	scope:'desktop'
}
    
empathySearch.topclicked(1, 10, options, function(data){
    //the data object will contain top clicked
    alert('test');
});