Skip to main content

Favourites

The Favourites library provides APIs for adding/removing contents as Favourites with Quickplay platform. The library facilitates marking any content as favorite content and also provides API to perform CRUD operations on Favourites contents.

The FabvoritesService is the interface for Favourites operations contract which has all the APIs to perform different operations (Put, Delete & Get favorite records).

Usage

Create FavouritesService

const favouritesService = flFavourites.createFavouriteService(
favouriteEndPointUrl,
platformAuthorizer,
);

Create, fetch and delete Favourites

// Get favourites contents
favouritesService.getFavourites(1, 100, SortBy.TIMESTAMP, SortOrder.ASC);

// Get favourite contents
favouritesService.getFavourite(contentId);

// Mark a content as favourites
favouritesService.putFavourite(contentId);

// Delete a favourites content
favouritesService.deleteFavourite(contentId);

// Get the favourite count
favouritesService.getFavouriteCount();