CachingMatchesRepository

class CachingMatchesRepository(matchDao: MatchDao, matchApiService: MatchApiService, context: Context) : MatchesRepository

A repository implementation that caches matches data and provides functionality to refresh the data from a network source.

Constructors

Link copied to clipboard
constructor(matchDao: MatchDao, matchApiService: MatchApiService, context: Context)

Properties

Link copied to clipboard
open override var wifiWorkInfo: Flow<WorkInfo>

Provides access to work information related to Wi-Fi connectivity checks.

Functions

Link copied to clipboard
open suspend override fun deleteMatch(task: Match)

Deletes a match from the repository.

Link copied to clipboard
open override fun getMatch(id: Int): Flow<Match?>

Retrieves a single match by its ID.

Link copied to clipboard
open override fun getMatches(date: String): Flow<List<Match>>

Retrieves a list of matches for a specific date.

Link copied to clipboard
open suspend override fun insertMatch(task: Match)

Inserts a match into the repository.

Link copied to clipboard
open suspend override fun refresh(date: String)

Refreshes the match data for a specific date.

Link copied to clipboard
open suspend override fun updateMatch(task: Match)

Updates an existing match in the repository.