OnlineSearchFactory
public enum OnlineSearchFactory
Factory for accessing the implementations for the Online Search APIs provided via the Search
protocol.
The Online Search API is a REST wrapper for a suite of web services that allow developers to use our scalable search engine.
-
Creates an instance conforming to the
Search
protocol.Declaration
Swift
public static func create( apiKey: String, customAPIURL: URL? = nil, geopoliticalView: String? = nil ) -> Search
Parameters
apiKey
A valid TomTom API Key.
customAPIURL
Custom 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.
geopoliticalView
The 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
Search
that provides access to Online Search functionality.