Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ApiMatch(val id: Int, val date: String?, val home_team: ApiTeam, val home_team_score: Int, val period: Int, val postseason: Boolean, val season: Int, val status: String, val time: String?, val visitor_team: ApiTeam, val visitor_team_score: Int)

Represents match data retrieved from the API.

Link copied to clipboard
@Serializable
data class ApiResponseMatch(val data: List<ApiMatch>, val meta: ApiMeta)

Represents the response structure for match-related API calls.

Link copied to clipboard
interface MatchApiService

Service interface for match-related network operations.

Functions

Link copied to clipboard

Converts a list of ApiMatch instances to a list of domain model Match instances.

fun Flow<List<ApiMatch>>.asDomainObjects(): Flow<List<Match>>

Transforms a flow of a list of ApiMatch to a flow of a list of Match.

Link copied to clipboard

A helper function to convert the network response for matches into a Flow.