CachingTeamsRepository

class CachingTeamsRepository(teamDao: TeamDao, teamApiService: TeamApiService, context: Context) : TeamsRepository

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

Constructors

Link copied to clipboard
constructor(teamDao: TeamDao, teamApiService: TeamApiService, 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 deleteTeam(task: Team)

Deletes a team from the repository.

Link copied to clipboard
open override fun getTeam(name: String): Flow<Team?>

Retrieves a single team by its ID.

Link copied to clipboard
open override fun getTeams(): Flow<List<Team>>

Retrieves a list of all teams.

Link copied to clipboard
open suspend override fun insertTeam(task: Team)

Inserts a team into the repository.

Link copied to clipboard
open suspend override fun refresh()

Refreshes the teams data.

Link copied to clipboard
open suspend override fun updateTeam(task: Team)

Updates an existing team in the repository.