Specifying LUNA PLATFORM URL and handler IDs#
To guarantee interaction of LUNA ID POS with LUNA PLATFORM 5, you need to specify the URL to LUNA PLATFORM 5. This URL will be used to send requests to LUNA PLATFORM 5.
Along with the the URL to LUNA PLATFORM 5, you need to specify IDs of LUNA PLATFORM 5 handlers so you can perform the required tasks.
Specify the baseUrl variable to provide the URL to LUNA PLATFORM 5 in the build.gradle.kts file. Consider the following example:
class DemoApp : Application () {
override fun onCreate() {
super.onCreate()
...
LunaID.apiHuman
// specify the URL to LUNA PLATFORM
val baseUrl = "http://luna-platform.com/api/6/"
}
}
The example has the following components:
| Component | Description |
|---|---|
LunaID.apiHuman |
Property. Provides access to the LUNA PLATFORM API and allows sending requests. |
baseUrl |
Variable. Specifies the LUNA PLATFORM URL that is used by the LunaID.apiHuman() function. |
To specify LUNA PLATFORM 5 handler IDs, define variables that correspond to the required handlers in constantHeaders.