Skip to main content

setDataToPanel

Set custom data to a panel - mostly for debugging/testing purposes.

Overview

Call this method to set custom data overrides to a panel. This is primarily intended for debugging and testing purposes.

Method Signature

fun setDataToPanel(data: CustomPanelData)

Parameters

ParameterTypeDescription
dataCustomPanelDataCustom data to set on the panel

CustomPanelData

CustomPanelData is a data class used to supply custom overrides to panel content.

data class CustomPanelData(
val stats: Stats? = null,
) {
data class Stats(
val overrideUrl: String,
)
}
PropertyTypeDefaultDescription
statsStats?nullStats-specific overrides. When provided, the SDK fetches stats data from the supplied URL instead of the default endpoint.
stats.overrideUrlStringRequiredThe URL from which stats data will be fetched.

Return Value

This method does not return a value.

Example

// Override the stats data URL for testing
sdk.setDataToPanel(
CustomPanelData(
stats = CustomPanelData.Stats(
overrideUrl = "https://your-server.example.com/stats/test-event.json"
)
)
)

// Clear overrides by passing null for each field
sdk.setDataToPanel(CustomPanelData())

Notes

  • This method is primarily for debugging and testing purposes
  • Use this to override panel data during development
  • When stats.overrideUrl is set, the SDK bypasses its default stats endpoint for the duration of the session