BaseSearchQueryBuilder

public class BaseSearchQueryBuilder

Important

This is a Public Preview API. It may be changed or removed at any time.

Public

  • Builder method that allows adding type-ahead to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(typeahead: Bool) -> Self

    Parameters

    typeahead

    If the “typeahead” flag is set, the query will be interpreted as a partial input and the search will enter predictive mode.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a limit to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(limit: Int) -> Self

    Parameters

    limit

    Maximum number of search results that will be returned by the search service.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding an offset to the FuzzySearchQueryBuilder. Used for pagination.

    Declaration

    Swift

    public func with(offset: Int) -> Self

    Parameters

    offset

    Starting offset of the returned results within the full result set.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a position to the FuzzySearchQueryBuilder. Used either to prioritize results nearest to a specific place, or (along with a radius) to limit results to a specific area.

    Declaration

    Swift

    public func with(position: CLLocationCoordinate2D) -> Self

    Parameters

    position

    Position around which results should be biased, or center of a circle within which results will be limited.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a radius to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(radius: Int) -> Self

    Parameters

    radius

    If radius and position are set, the results will be constrained to the defined area.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a bounding box to the FuzzySearchQueryBuilder. Only results within the bounding box will be returned.

    Declaration

    Swift

    public func with(topLeft: CLLocationCoordinate2D, btmRight: CLLocationCoordinate2D) -> Self

    Parameters

    topLeft

    Top left corner of the bounding box.

    btmRight

    Bottom right corner of the bounding box.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a language to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(language: String) -> Self

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a categorySet to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(categorySet: [Int]) -> Self

    Parameters

    categorySet

    The list of the most specific POI categories.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding openingHours to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(openingHours: OpeningHours) -> Self

    Parameters

    openingHours

    The type of opening hours requested.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a minFuzzyLevel to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(minFuzzyLevel: Int) -> Self

    Parameters

    minFuzzyLevel

    Minimum fuzziness level to be used.

    Return Value

    FuzzySearchQueryBuilder object

  • Builder method that allows adding a maxFuzzyLevel to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(maxFuzzyLevel: Int) -> Self

    Parameters

    maxFuzzyLevel

    Maximum fuzziness level to be used.

    Return Value

    FuzzySearchQueryBuilder object

  • Builder method that allows adding a countrySet to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(countrySet: [String]) -> Self

    Parameters

    countrySet

    An array of ISO 3166-1 alpha3 country codes. (e.g., FRA, ESP). ISO 3166-1 alpha2 country codes (e.g., FR, ES) are also supported, but only for the online search mode.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a brandSet to the FuzzySearchQueryBuilder. Results will only be returned if they match at least one brand in the set.

    Declaration

    Swift

    public func with(brandSet: [String]) -> Self

    Parameters

    brandSet

    A comma-separated list of brand names.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a minPowerKW to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(minPowerKW: Float) -> Self

    Parameters

    minPowerKW

    An optional parameter to restrict the results to Electric Vehicle Stations with at least one connector with a specific minimum power in kilowatts (closed interval - with that value).

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a maxPowerKW to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(maxPowerKW: Float) -> Self

    Parameters

    maxPowerKW

    An optional parameter to restrict the results to Electric Vehicle Stations with at least one connector with a specific maximum power in kilowatts (closed interval - with that value).

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a fuelSet to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(fuelSet: FuelSet) -> Self

    Parameters

    fuelSet

    A comma-separated list of fuel types, used to restrict the results to Points Of Interest with specific fuels. If fuelSet is specified, the rest of the query can be empty. In that case, POIs with the requested fuel type will be returned.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding an extendedPostalCodesIndexes to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(extendedPostalCodesIndexes: [IndexType]) -> Self

    Parameters

    extendedPostalCodesIndexes

    Indexes for which extended postal codes should be included in the results.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding an idxSet to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(idxSet: [IndexType]) -> Self

    Parameters

    idxSet

    A comma-separated list of indexes which should be used for the search.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a connectorSet to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(connectorSet: [String]) -> Self

    Parameters

    connectorSet

    A comma-separated list of connector types, used to restrict the results to Electric Vehicle Stations that support specific connector types. A list of specific connector types is available at: https://developer.tomtom.com/search-api/search-api-documentation/supported-connector-types

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a geopolitical view to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(view: String) -> Self

    Parameters

    view

    Geopolitical View. Geopolitical views are used to determine how disputed territories are displayed. Views include Unified, along with AR, IL, IN, MA, PK, RU, TR, and CN which are respectively tailored for Argentina, Israel, India, Morocco, Pakistan, Russia, Turkey, and China.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding a timeZone to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(timeZone: String) -> Self

    Parameters

    timeZone

    Used to indicate the mode in which the timeZone object should be returned.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding MapCodes to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(mapcodes: [String]) -> Self

    Parameters

    mapcodes

    Enables the return of a comma-separated mapcode list. It can also filter the response to only show selected mapcode types.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding requests for related POIs to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(relatedPois: String) -> Self

    Parameters

    relatedPois

    An optional parameter for requesting related Points Of Interest.

    Return Value

    FuzzySearchQueryBuilder object.

  • Builder method that allows adding an entityTypeSet to the FuzzySearchQueryBuilder.

    Declaration

    Swift

    public func with(entityTypeSet: [String]) -> Self

    Parameters

    entityTypeSet

    A comma-separated list of entity types, used to restrict the results to specific entity types. If entityTypeSet is specified, only a Geography result with a matching entity type will be returned.

    Return Value

    FuzzySearchQueryBuilder object.