Autocomplete
fun <T> Autocomplete(httpService: HttpAutocompleteService<T>, options: AutocompleteOptions = AutocompleteOptions(), dispatcher: CoroutineDispatcher = Dispatchers.Default): Autocomplete<T>
Creates a new Autocomplete instance that uses a HTTP service to provide autocomplete suggestions.
Return
A new Autocomplete instance.
Parameters
T
The type of the autocomplete suggestions results.
httpService
The HTTP service to use for autocomplete suggestions.
options
The options to use for the autocomplete.
dispatcher
The coroutine dispatcher to use for the autocomplete.
fun <T> Autocomplete(endpoint: SearchEndpoint<T>, options: AutocompleteOptions = AutocompleteOptions(), json: Json = HttpApiEndpoint.json(), httpClient: HttpClient = HttpApiEndpoint.httpClient(json), dispatcher: CoroutineDispatcher = Dispatchers.Default): Autocomplete<T>
Creates a new Autocomplete instance that uses a HTTP service to provide autocomplete suggestions.
Return
A new Autocomplete instance.
Parameters
T
The type of the autocomplete suggestions results.
endpoint
The search endpoint to use for autocomplete suggestions.
options
The options to use for the autocomplete.
json
The JSON serializer to use for the autocomplete.
httpClient
The HTTP client to use for the autocomplete.
dispatcher
The coroutine dispatcher to use for the autocomplete.