SDK lifecycle
Initialization
Initializes Synerise SDK.
Declared In
lib/main/Synerise.js
Builder Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
withBaseUrl |
string |
no | - | Synerise API custom environment base URL |
withClientApiKey |
string |
yes | - | Synerise Client API Key |
withDebugModeEnabled |
boolean |
no | - | Enables/disables console logs |
withCrashHandlingEnabled |
boolean |
no | - | Enables/disables crash handling |
withSettings |
object |
no | - | Settings that have to be set before Synerise is initialized |
Return Value
There is no return value.
Example
Synerise.Initializer()
.withBaseUrl("YOUR_API_BASE_URL")
.withClientApiKey('YOUR_CLIENT_API_KEY')
.withDebugModeEnabled(true)
.withCrashHandlingEnabled(true)
.withSettings({
sdk: {
enabled: true
})
.init();
Change client API key
Use this method to change API key dynamically.
Declared In
lib/main/Synerise.js
Method
Synerise.changeClientApiKey(apiKey)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiKey |
string |
yes | - | New apiKey |
Return Value
There is no return value.
Example
Synerise.changeClientApiKey(apiKey);