OnlineSearchFactory
public enum OnlineSearchFactory
Factory for accessing the implementations for the Search APIs. The Online Search API is a REST wrapper for a suite of web services that allow developers to use our scalable search engine.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance conforming to the
Searchprotocol.Note
if you need cancellation support usecreateCancellableOnlineSearch(apiKey:customAPIURL:geopoliticalView:)instead.Declaration
Swift
public static func createOnlineSearch( apiKey: String, customAPIURL: URL? = nil, geopoliticalView: String? = nil ) -> SearchParameters
apiKeyA valid TomTom API Key.
customAPIURLCustom base URL for online APIs. Defaults to nil, and “https://api.tomtom.com/search/2” is the base URL. Can be used to change to another service that implements the same API.
geopoliticalViewThe country code in the ISO 3166-1 alpha-2 format whose view on disputed areas should be used. If not provided or not supported, the international geopolitical view is used.
Return Value
an instance conforming to
Searchthat provides access to Online Search functionality. -
Creates a search instance conforming to
CancellableSearch.Declaration
Swift
public static func createCancellableOnlineSearch( apiKey: String, customAPIURL: URL? = nil, geopoliticalView: String? = nil ) -> CancellableSearchParameters
apiKeyA valid TomTom API Key.
customAPIURLCustom base URL for online APIs. Defaults to nil and “https://api.tomtom.com/search/2” will be the base URL. Can be used to change to another service that implements the same API.
geopoliticalViewThe country code in the ISO 3166-1 alpha-2 format whose view on disputed areas should be used. If not provided or not supported, the international geopolitical view is used.
Return Value
an instance conforming to
CancellableSearchthat provides access to Online Search functionality.
OnlineSearchFactory Enumeration Reference