Classes

The following classes are available globally.

CustomRecord

  • A single record from a custom data source.

    Important

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

    Declaration

    Swift

    public class CustomRecord

CustomPOIRecord

  • A single custom POI record.

    Important

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

    Declaration

    Swift

    public final class CustomPOIRecord : CustomRecord

CustomPOISearchDataProvider

AutocompleteResponse

  • Represents the response of the Autocomplete Search API, containing a summary and a list of autocomplete results.

    autocomplete(options:completion:) uses AutocompleteResponse to encapsulate the results for an autocomplete request.

    An example usage of AutocompleteResponse:

    let options = AutocompleteOptions(
        query: "mar",
        position: .AMSTERDAM,
        radius: Measurement(value: 100, unit: .kilometers)
    )
    search.autocomplete(options: options) { result in
        switch result {
        case let .success(response):
            response.results.forEach { result in
                result.segments.forEach { segment in
                    switch segment {
                    case .brand(let brand):
                        print("\(brand.brand.name) - brand")
                    case .poiCategory(let category):
                        print("\(category.poiCategory.name) - category")
                    case .plainText(let text):
                        print("\(text.plainText) - plain text")
                    @unknown default:
                        print("unknown")
                    }
                }
            }
        case let .failure(error):
            print("Handle error: \(error)" )
        }
    }
    
     // Prints:
     //   Market - category
     //   Marqt - brand
     //   Marina - category
     //   Marriott - brand
    
    See more

    Declaration

    Swift

    public class AutocompleteResponse

AutocompleteSummary

  • AutocompleteSummary provides information about an autocomplete request that was performed.

    This class is part of the AutocompleteResponse definition. It contains the query phrase and geo-bias information.

    See more

    Declaration

    Swift

    public class AutocompleteSummary

AutocompleteGeoBias

  • AutocompleteGeoBias represents geographical bias used by the autocomplete engine to improve search results.

    AutocompleteGeoBias is part of the definition for AutocompleteSummary which is returned from the Search.autocomplete(options:completion:) method.

    Fox example, for the geobias Amsterdam query “Fie” can return the autocomplete result “Fietsenwinkel.nl”, for the geobias Berlin query “Fie” can return the autocomplete result “Fielmann”.

    See more

    Declaration

    Swift

    public class AutocompleteGeoBias

AutocompleteResult

  • The result returned by the autocomplete search.

    An AutocompleteResult object includes an array of segments that correspond to recognized entities. These entities can be brand, poiCategory, or plainText.

    When the query contains multiple recognized entities, a single autocomplete result may contain multiple segments. For instance, if a user enters the query “Chess Bis,” the autocomplete search result could include 2 segments: a plain text segment containing “Chess” and a category segment with “Bistro.”

    Instances of this class are utilized as components of the Search.autocomplete(options:completion:) method, accessible through the AutocompleteResponse.results property.

    See more

    Declaration

    Swift

    public class AutocompleteResult

AutocompleteInputQuery

  • Represents how the user’s input query matches the provided autocomplete result.

    This class provides information about the input query that triggered the autocomplete search. Such information includes the starting offset and length of the matched substring in the original text.

    Important

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

    Declaration

    Swift

    public class AutocompleteInputQuery