autocomplete

Description:
  • Interface to autocomplete related API calls.
Source:
Interface to autocomplete related API calls.

Methods

(inner) getAutocompleteResults(query, parametersopt, networkParametersopt) → {Promise}

Description:
  • Retrieve autocomplete results from Constructor.io API
Source:
See:
Example
constructorio.autocomplete.getAutocompleteResults('t-shirt', {
    resultsPerSection: {
        Products: 5,
        'Search Suggestions': 10,
    },
    filters: {
        size: 'medium'
    },
});
Parameters:
Name Type Attributes Description
query string Term to use to perform an autocomplete search
parameters object <optional>
Additional parameters to refine result set
Properties
Name Type Attributes Description
numResults number <optional>
The total number of results to return
filters object <optional>
Key / value mapping (dictionary) of filters used to refine results
filtersPerSection object <optional>
Filters used to refine results per section
resultsPerSection object <optional>
Number of results to return (value) per section (key)
hiddenFields Array.<string> <optional>
Hidden metadata fields to return
variationsMap object <optional>
The variations map object to aggregate variations. Please refer to https://docs.constructor.io/rest_api/variations_mapping for details
networkParameters object <optional>
Parameters relevant to the network request
Properties
Name Type Attributes Description
timeout number <optional>
Request timeout (in milliseconds)
Returns:
Type
Promise