Swift |
|
public class HCLManager : NSObject, HCLSDKConfigure extension HCLManager: HCLManagerProtocol
|
This class represents a search screen manager object, providing methods to customize search screens and manage access to the SDK.
Swift |
|
let manager = HCLManager.share manager.initialize(apiKey: <YOUR_API_KEY>, configure: <SEARCH_CONFIGURATION_BASE_ON_YOUR_BUSINESS>, theme: <FONT_AND_COLOR_CUSTOMIZATION>, icons: <ICONS_CUSTOMIZATION>, handler: <CALLBACK_TO_HANDLE_INITILAZATION_RESULT>) let searchHCPVC = manager.getWebServices()
|
The user interface could be configured through settings of theme and icons while initializing the HCLManager instance.
APIs must be accessed through HCLManager instance after initialization with API key.
HealthCare Locator 1.0 and higher
● set user ID
● set app name and download
Customize configuration for inputting criteria on search screens.
Swift |
|
public func configure(search: HCLSearchConfigure?)
|
search |
Customize searching by providing your own values. |
HealthCare Locator 1.0 and higher
Initialize search screens with the SDK.
Swift |
|
public func initialize(apiKey: String, configure: HCLSearchConfigure? = nil, theme: HCLThemeConfigure? = nil, icons: HCLIconsConfigure? = nil, handler: ((Bool, Error?) -> Void)? = nil)
|
apiKey |
|
configure |
Search to configure. |
theme |
Theme to configure. |
icons |
Icons to configure. |
handler |
Handler to configure. |
The API key must be set before using the search features or it will raise an exception at run time.
HealthCare Locator 1.0 and higher
Get default configuration for inputting criteria on search screens if configuration is not set.
Swift |
|
public func getDefaultSearchConfigure() -> HCLSearchConfigure
|
An object of the HCLSearchConfigure type.
HealthCare Locator 1.0 and higher
Get default UI configuration for displaying search screens.
Swift |
|
public func getDefaultUIConfigure() -> HCLThemeConfigure
|
An object of the HCLThemeConfigure type.
HealthCare Locator 1.0 and higher
Get the root instance of search screens.
Swift |
|
public func getHCPSearchViewController() -> HCLHCPSearchNavigationViewController
|
An object of the HCLHCPSearchNavigationViewController type.
HealthCare Locator 1.0 and higher
If you want to build your own search screen UI, then get the instance for calling APIs directly without attaching the default search screen UI. Initialization must be completed before using the web services. For example:
HCLManager.share.initialize(apiKey: <YOUR_API_KEY>, handler: {[unowned manager = HCLManager.share] success in if success { let webService = manager.getWebServices() } })
Swift |
|
public func getWebServices() -> HCLHCPSearchWebServices
|
An object of the HCLHCPSearchWebServices type.
HealthCare Locator 1.0 and higher
Start a new search quickly after attaching search navigation into your app’s search screen UI.
Swift |
|
@discardableResult public func searchNearMe(specialities: [String]) -> Bool
|
specialities |
The list of HCP specialities for a search. |
A boolean value to indicate if the action is successful or not.
There might be times (depending on your business needs) you want to display a search quickly using your own UI components, such as menus or buttons.
The result might fail if the root search navigation is not attached to your screen.
HealthCare Locator 1.0 and higher
Specifies the user ID that is required to store a user’s search history.
Swift |
|
public func set(userId: String)
|
userID |
A unique ID that identifies a user. |
HealthCare Locator 1.0 and higher
Specifies the name and download link of your app.
Swift |
|
public func set(appName: String, appDownloadLink: String?)
|
appName |
Name of your app to search/interact with the Activity API. |
appDownloadLink |
URL to download SDK for iOS. |
HealthCare Locator 1.0 and higher
Changes displayed language for SDK.
Swift |
|
public func setLocale(language: HCLLanguage)
|
lang |
Language code. |
By default, the SDK will use device language. If device language is not in supported range, then language will fall back to English.
The language code must be a supported language, such as English:
en
HealthCare Locator 1.0 and higher