search

abstract fun search(searchOptions: SearchOptions): Result<SearchResponse, SearchFailure>

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

Return

The Result contains a SearchResponse in if the call succeeds or a SearchFailure if it fails.

Parameters

searchOptions

The object which contains the data necessary to execute the search action.


abstract fun search(options: SearchOptions, callback: SearchCallback): Cancellable

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

Return

Cancellable search operation.

Parameters

options

The configuration options for the search.

callback

The SearchCallback invoked when the search operation has been finished either successfully or with an error. The callback will be executed in the main thread.