FavouritesService

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun deleteFavourite(contentId: String): Result<Unit, Error>

Makes a call to Favourites Service Microservice and deletes the favourite for a given content identifier.

Link copied to clipboard
abstract suspend fun getFavourite(contentId: String): Result<FavouritesRecord, Error>

Makes a call to Favourites Service Microservice and retrieves the FavouritesRecord instance for a given content identifier.

Link copied to clipboard
abstract suspend fun getFavourites(pageNumber: Int = DEFAULT_PAGE_NUM, pageSize: Int = DEFAULT_PAGE_SIZE, sortBy: SortByType = SortByType.TIMESTAMP, sortOrder: SortOrderType = SortOrderType.DESC): Result<List<FavouritesRecord>, Error>

Makes a call to Favourites Service Microservice and retrieves the collection of FavouritesRecord instances.

Link copied to clipboard

Makes a call to Favourites Service Microservice and retrieves the count of all Favourites.

Link copied to clipboard
abstract suspend fun putFavourite(contentId: String): Result<Unit, Error>

Makes a call to Favourites Service Microservice and inserts a favourite instance for a given content identifier.