/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.favorites.v2.data.network/FavoritesRepository

FavoritesRepository

interface FavoritesRepository

Repository class to handle syncing of favorites to server and local storage

Inheritors

FavoritesRepositoryImpl

Types

Name Summary
FavoritesRepositoryImpl class FavoritesRepositoryImpl@Injectconstructor(api: FavoritesApi, favoriteDao: FavoriteDaoV2) : FavoritesRepository

Functions

Name Summary
addFavorite abstract fun addFavorite(favoriteDto: FavoriteV2): Flow<Resource<FavoriteV2>>
deleteFavorite abstract fun deleteFavorite(favoriteId: String): Flow<Resource<Unit>>
deleteFavoriteWithLocationAddress abstract fun deleteFavoriteWithLocationAddress(locationAddress: String): Flow<Resource<Unit>>
deleteFavoriteWithStopCode abstract fun deleteFavoriteWithStopCode(stopCode: String): Flow<Resource<Unit>>
getFavoriteById abstract fun getFavoriteById(uuid: String): Flow<FavoriteV2?>
getFavoriteByType abstract fun getFavoriteByType(type: FavoriteType): Flow<FavoriteV2?>
getFavorites abstract fun getFavorites(syncFromServer: Boolean = false): Flow<Resource<FavoriteResponse>>
isFavorite abstract fun isFavorite(favoriteId: String): Flow<Resource<Boolean>>
isFavoriteByLocation abstract fun isFavoriteByLocation(location: FavoriteV2.LocationFavorite): Flow<Resource<Boolean>>
isFavoriteByStopCode abstract fun isFavoriteByStopCode(stopCode: String): Flow<Resource<Boolean>>
queryFavorites abstract fun queryFavorites(query: String): Flow<Resource<FavoriteResponse>>