Games (GYP) Headless Functions
Games (GYP) Headless Functions
getRecreationalGamesMatchup(matchupId: String) -> AsyncStream<Result<LucraMatchup?, APIError>>
getRecreationalGamesMatchup(matchupId: String) -> AsyncStream<Result<LucraMatchup?, APIError>>Parameters
Returns
Usage
let stream = lucraClient.api.getRecreationalGamesMatchup(matchupId: "c32d...")
Task {
for await result in stream {
switch result {
case .success(let matchup):
if let matchup {
print("Matchup status: \(matchup.status)")
} else {
print("Matchup not found")
}
case .failure(let error):
print("Failed to load matchup: \(error)")
}
}
}getRecreationalGamesMatchup(matchupId: String) async -> Result<LucraMatchup, GamesMatchupError>
getRecreationalGamesMatchup(matchupId: String) async -> Result<LucraMatchup, GamesMatchupError>Parameters
Returns
Usage
createRecreationalGame(gameTypeId: String, atStake: RewardType, playStyle: PlayStyle) async -> Result<String, GamesMatchupError>
createRecreationalGame(gameTypeId: String, atStake: RewardType, playStyle: PlayStyle) async -> Result<String, GamesMatchupError>Parameters
Returns
Usage
acceptVersusRecreationalGame(matchupId: String, groupId: String) async -> Result<Bool, GamesMatchupError>
acceptVersusRecreationalGame(matchupId: String, groupId: String) async -> Result<Bool, GamesMatchupError>Parameters
Returns
Usage
acceptFreeForAllRecreationalGame(matchupId: String) async -> Result<Bool, GamesMatchupError>
acceptFreeForAllRecreationalGame(matchupId: String) async -> Result<Bool, GamesMatchupError>Parameters
Returns
Usage
cancelRecreationalGame(matchupId: String) async -> Result<Bool, GamesMatchupError>
cancelRecreationalGame(matchupId: String) async -> Result<Bool, GamesMatchupError>Parameters
Returns
Usage
Error Types
GamesMatchupError
GamesMatchupErrorUserStateError
UserStateErrorLocationError
LocationErrorLast updated
