SearchApi

interface SearchApi

Interface of the search API.

Functions

Link copied to clipboard
abstract fun alongRouteSearch(alongRouteSearchOptions: AlongRouteSearchOptions): Result<AlongRouteSearchResponse, SearchError>

Performs a synchronous search along the route described by the provided AlongRouteSearchOptions object. Delivers the Result containing an AlongRouteSearchResponse, or an SearchError if the action fails.

abstract fun alongRouteSearch(alongRouteSearchOptions: AlongRouteSearchOptions, alongRouteSearchCallback: AlongRouteSearchCallback): Cancellable

Performs an asynchronous search along the route described by the provided AlongRouteSearchOptions object. Returns the result using the provided AlongRouteSearchCallback.

Link copied to clipboard
abstract fun autocompleteSearch(autocompleteSearchOptions: AutocompleteSearchOptions): Result<AutocompleteSearchResponse, SearchError>

Performs a synchronous Autocomplete Search using the provided AutocompleteSearchOptions object. Delivers the Result using an AutocompleteSearchResponse, or an SearchError if the action fails.

abstract fun autocompleteSearch(autocompleteSearchOptions: AutocompleteSearchOptions, autocompleteSearchCallback: AutocompleteSearchCallback): Cancellable

Performs an asynchronous autocomplete search using the provided AutocompleteSearchOptions object. Returns the result using the provided AutocompleteSearchCallback.

Link copied to clipboard
abstract fun poiCategories(categoryOptions: CategoryOptions): Result<CategoryResponse, SearchError>

Performs a synchronous point of interest (POI) category detail fetch using the provided CategoryOptions object. Delivers a Result containing a CategoryResponse, or a SearchError if the call fails.

abstract fun poiCategories(categoryOptions: CategoryOptions, poiCategoryCallback: CategoryCallback): Cancellable

Performs an asynchronous point of interest (POI) category detail fetch using the provided CategoryOptions object. Returns the result using the provided CategoryCallback.

Link copied to clipboard
abstract fun search(searchOptions: SearchOptions): Result<SearchResponse, SearchError>

Performs a synchronous search computing action based on the provided SearchOptions object and delivers the Result by the provided SearchResponse, or by a SearchError if the action fails.

abstract fun search(searchOptions: SearchOptions, searchCallback: SearchCallback): Cancellable

Performs an asynchronous search computing action based on the provided SearchOptions object and returns the result by the provided SearchCallback.

Link copied to clipboard
abstract fun sendFeedbackEvent(eventData: EventData)

The client application has the option to report feedback events to Search SDK. This is then reported to the online search service backend to improve users' search experience. Note that the sending of feedback happens asynchronously without reporting the success or failure of sending the feedback.