Favourites
Summary
The Favourites feature enables the user to store favourite items. The type of item is up to the client application developer; the service does not restrict on item type. Common uses are favourite channels and VOD assets. The service currently only supports a single favourite list per user and item type.
Each favourite can be assigned a priority if needed, to enable the user to order the favourite items (for example to create a list of favourite channels, with the most favourite first).
Data model
The Favourite data model is provided in the table below, followed by an example of a response.
Use cases
The Favourites Service is accessed directly on the User Activity Vault.
Favourites are stored in a favourites list. You can work with favourite lists or with specific favourite items on a favourite list.
Working with favourite items
Creating a Favourite item for an account
In the example below, the content "TDLA0100000088341751" is being added as a favourite on the account "AC1234":
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist/FL9876/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"contentType": "ASSET", "creationDate": "2017-05-25T05:02:26.833Z"}
Creating a Favourite item for an account and user
In the example below, the content "TDLA0100000088341751" is being added as a favourite on the account "AC1234" for user "USR1234":
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist/FL4567/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"contentType": "ASSET", "creationDate": "2017-05-25T05:02:26.833Z"}
Deleting a Favourite item from an account's favourites list
In the example below, the content "TDLA0100000088341751" is being removed as a favourite from the account "AC1234":
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist/FL9876/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Deleting a Favourite item from a user's favourites list
In the example below, the content "TDLA0100000088341751" is being removed as a favourite from the account "AC1234" for user "USR1234":
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist/FL4567/content/TDLA0100000088341751
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Getting Favourites for a given account
In the example below, a list of the favourites on the account "AC1234" is being requested:
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist/FL9876
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Getting Favourites for a given user
In the example below, a list of the favourites on the account "AC1234" for user "USR1234" is being requested:
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist/FL4567
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Working with favourites lists
Creating a new Favourites list for an account
In the example below, a new favourites list "FL6543" is being created on the account "AC1234":
POST http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL6543", "creationDate": "2017-05-25T05:02:26.833Z"}
Creating a new Favourites list for a user
In the example below, a new favourites list "FL5678" is being created on the account "AC1234" for user "USR1234":
POST http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL5678", "creationDate": "2017-05-25T05:02:26.833Z"}
Deleting a Favourite list from an account
In the example below, the favourites list "FL6543" and all its entries are being deleted from the account "AC1234":
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslists/FL6543
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Deleting a Favourite list from a user
In the example below, the favourites list "FL5678" and all its entries are being deleted from the account "AC1234" for user "USR1234":
DELETE http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslists/FL4567
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Getting the favourites lists for a given account
In the example below, all favourites lists on the account "AC1234" are being requested:
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Getting the favourites lists for a given user
In the example below, all favourites lists on the account "AC1234" for user "USR1234" are being requested:
GET http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslists
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
Updating a favourites list for an account
In the example below, the favourites list "FL6543" on the account "AC1234" is being updated:
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/favouriteslist
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL6543", "name": "Kids", "creationDate": "2017-05-25T05:02:26.833Z", "modifiedDate": "2017-05-25T05:02:26.833Z"}
Updating a favourites list for a user
In the example below, the favourites list "FL5678" on the account "AC1234" is being updated:
PUT http://server:port//useractivityvault/v1/clientdata/account/AC1234/user/USR1234/favouriteslist
Content-Type: application/json
token : 2HFAQk7EtPMyRGT787M9cExU3HeD
{"id": "FL5678", "name": "Movies", "creationDate": "2017-05-25T05:02:26.833Z", "modifiedDate": "2017-05-25T05:02:26.833Z"}
See also
For more details, see Api Doc - Favourite Item and Api Doc - Favourite Lists in the UAV Installation and User Guide.