Javascript Search Library: Links

Uses the links endpoint to retrieve link configured in the EmpathyBroker dashboard.

You can search using the search function.

links (term, maxitems, scope, options, callback)
ParameterDescriptionData TypeMandatory
termsThe query typed by the userStringYes
maxitemsMax number of links to be retrievedIntegerNo
scopeThis parameter is used for separate analytic data between two or more different scenariosStringNo
optionsObject that may contain information about filters and other required data.ObjectNo
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 Links section of SEARCH REST API
var options = {
    lang:'en'
}
empathySearch.links('term', 10, 'testscope', options, function(data){
    //the data object will contain link results
    alert('test');
});