GYP Events
Listening for GYP events
.onReceive(lucraClient.$event, perform: { event in
guard let self, let event else { return }
self.handleEvent(event)
})
private func handleEvent(_ event: Event) {
switch event {
case gamesMatchupCreated(let id):
print("Games Matchup Created: \(id)")
case gamesMatchupAccepted(let id):
print("Games Matchup Accepted: \(id)")
case gamesMatchupCanceled(let id):
print("Games Matchup Cancelled: \(id)")
case gamesMatchupStarted(let id):
print("Games Matchup Started: \(id)")
case gamesActiveMatchupStarted(let id, let matchup):
print("Matchup started with Active scoring: \(event.id), matchup object: \(event.matchup)")
default:
break
}
}Event reference
Last updated
