Games You Play Events
Listening for GYP events
LucraClient().setEventListener(object : LucraEventListener {
override fun onEvent(event: LucraEvent) {
when (event) {
is LucraEvent.GamesContest.Created -> {
Log.d("Sample", "Contest created: ${event.contestId}")
}
is LucraEvent.GamesContest.Accepted -> {
Log.d("Sample", "Contest accepted: ${event.contestId}")
}
is LucraEvent.GamesContest.Canceled -> {
Log.d("Sample", "Contest canceled: ${event.matchupId}")
}
is LucraEvent.GamesContest.Started -> {
Log.d("Sample", "Contest started: ${event.matchupId}")
}
is LucraEvent.GamesContest.StartedActive -> {
Log.d(
"Sample",
"Contest started with Active scoring: ${event.matchupId}, matchup: ${event.lucraMatchup}"
)
}
}
}
})Event reference
Last updated
