Repository
Coordinates a remote NetworkDataSource with a LocalDataSource under a CachePolicy. Mirrors SwiftyNetwork's Repository.
Inheritors
Functions
Link copied to clipboard
abstract suspend fun fetch(endpoint: NetworkEndpoint, cacheKey: CacheKey, policy: CachePolicy = CachePolicy.Default): E
Link copied to clipboard
open fun stream(endpoint: NetworkEndpoint, cacheKey: CacheKey, policy: CachePolicy = CachePolicy.Default): Flow<E>
Link copied to clipboard
open fun streamOrNull(endpoint: NetworkEndpoint, cacheKey: CacheKey, policy: CachePolicy = CachePolicy.Default): Flow<E?>
Observes the entity like stream, also emitting null when its local value is removed.