Sports You Watch Headless Functions
Sports You Watch Headless Functions
matchup(for:) -> AsyncStream<Result<LucraMatchup?, APIError>>
matchup(for:) -> AsyncStream<Result<LucraMatchup?, APIError>>Parameters
Returns
Usage
let stream = lucraClient.api.matchup(for: "syw-2024-001")
Task {
for await result in stream {
switch result {
case .success(let matchup):
if let matchup {
print("Fetched matchup: \(matchup.id)")
} else {
print("Matchup not found.")
}
case .failure(let error):
print("Failed to load matchup: \(error)")
}
}
}matchup(for:) async -> Result<LucraMatchup, MatchupError>
matchup(for:) async -> Result<LucraMatchup, MatchupError>Parameters
Returns
Usage
Error Types
MatchupError
MatchupErrorUserStateError
UserStateErrorLocationError
LocationErrorLast updated
