Builder

class Builder(query: String, language: String)

Builder used to create an instance of the AutocompleteSearchOptions. Once constructed, the user cannot change the field values.

Parameters

query

The searched query.

language

Language in which the autocomplete results should be returned. Must be one of the TomTom-supported IETF language tags. See https://developer.tomtom.com/search-api/search-api/supported-languages for more details.

Constructors

Link copied to clipboard
fun Builder(query: String, language: String)

Functions

Link copied to clipboard
fun build(): AutocompleteSearchOptions

Construct a new AutocompleteSearchOptions.

Link copied to clipboard
fun countryCodes(countryCodes: Set<String>): AutocompleteSearchOptions.Builder

A set of country codes (e.g., FR,ES). This limits the Autocomplete results to the specified countries.

Link copied to clipboard
fun language(language: String): AutocompleteSearchOptions.Builder

Language in which the autocomplete results should be returned. Must be one of the TomTom-supported IETF language tags. See https://developer.tomtom.com/search-api/search-api/supported-languages for more details.

Link copied to clipboard
fun limit(limit: Int): AutocompleteSearchOptions.Builder

The maximum number of autocomplete results to return.

Link copied to clipboard
fun position(position: GeoCoordinate): AutocompleteSearchOptions.Builder

The position around which results should be biased.

Link copied to clipboard
fun query(query: String): AutocompleteSearchOptions.Builder

The search query.

Link copied to clipboard
fun radius(radius: Int): AutocompleteSearchOptions.Builder

The search radius, in meters.

Link copied to clipboard
fun resultTypes(resultTypes: Set<String>): AutocompleteSearchOptions.Builder

Restricts the results to specific segments (e.g., "category", "brand", or "category,brand"). A result is only included if at least one segment is any of the indicated types.