A class to access the Mappedin Search API. This will be created for you as part of Mappedin.Mappedin/initailize:method, but you can also create one manually.

Show:

Methods

Properties

suggest
(
  • query
)
Promise

Makes a call to the Mappedin Smart Search Suggestions API with the provided query, retuning a Promise that will fulfill with a Suggestions object. This will contain a list of hits, which are words that match full search results. This should be used to aid in autocoplete for a search bar. It's ordered for you by most relevant.

Parameters:

  • query String

    The string to get autocomplete suggestions for

Returns:

Promise:

The promise will resolve with either a Suggestions object if successful, or an error with a message and status if it fails

    Suggestions has the following propertyies and methods:
          query: The suggestion query that triggered this list of suggestions (to make sure it's still what's in the text bar)
          total: The total number of suggestions.
          hits: The array of Strings matching the query

ASSET_TYPES

LOCATION, EVENT private

The types of assets available for this venue.