Skip to main content

Favorites

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

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

Usage

Create FavoritesService

Create Favorite Service
favoritesService = FLFavoriteFactory().favoriteService(endPoint, platformAuthorizer)

Create, fetch and delete favorites

Get, put and delete favorites

' Get Favorite contents
pageNumber = 1
pageSize = 100
sortBy = "15434565" ' Timestamp
sortOrder = "asc" ' asc or desc are allowed options

favoritesService.getFavorites(pageNumber, pageSize, sortBy, sortOrder, callContext, sub(context, response, error)
if error <> invalid
' failure
else
' success
end if
end sub)

' Mark a content as Favorite
favoritesService.putFavorite(itemId, callContext, sub(context, response, error)
if error <> invalid
' failure
else
' success
end if
end sub)


' Delete a favorite content
favoritesService.deleteFavorite(itemId, callContext, sub(context, response, error)
if error <> invalid
' failure
else
' success
end if
end sub)