FavouritesServiceImpl

class FavouritesServiceImpl(favouriteEndPointURL: String, platformAuthorizer: PlatformAuthorizer) : FavouritesService

Implementation of the FavouritesService interface for obtaining access to Platform Services.

Constructors

Link copied to clipboard
constructor(favouriteEndPointURL: String, platformAuthorizer: PlatformAuthorizer)

Creates a FavouritesService instance

Functions

Link copied to clipboard
open suspend override 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
open suspend override 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
open suspend override fun getFavourites(pageNumber: Int, pageSize: Int, sortBy: SortByType, sortOrder: SortOrderType): Result<List<FavouritesRecord>, Error>

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

Link copied to clipboard
open suspend override fun getFavouritesCount(): Result<FavouritesCount, Error>

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

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

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