Skip to content

Commit

Permalink
Update recommendation documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pyby committed Nov 1, 2020
1 parent 00a0a1f commit 933ff09
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 11 deletions.
11 changes: 8 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,22 @@ A wide list of parameters are available.

#### Recommendation for a media

* `/api/v2/playlist/recommendation/continuousPlayback/{urn}` : get media list object.
* `/api/v2/playlist/recommendation/continuousPlayback/{urn}` : get recommended medias for a continuous playback purpose.
* `standalone` (optional, boolean): Recommendation for the playback mode. Default is `false`.
* Returns a `recommendedList` object.

* *Deprecated* `/api/v1/playlist/recommendation/continuousPlayback/{urn}` : get media list object.
* `/api/v2/playlist/recommendation/relatedContent/{urn}` : get recommended medias for a related content purpose.
* `standalone` (optional, boolean): Recommendation for the playback mode. Default is `false`.
* Returns a `recommendedList` object.

* *Deprecated* `/api/v1/playlist/recommendation/continuousPlayback/{urn}` : get recommended medias for a continuous playback purpose. * `standalone` (optional, boolean): Recommendation for the playback mode. Default is `false`.
* `format` (optional, string): If set to `urn`, it returns an URN list. Default is `media` and redirects to an IL media list response.

More informations about the [recommendation engine](RECOMMENDATION.md) is available.

#### Personnal recommendation for a user

* `/api/v2/playlist/personalRecommendation` : get media list object.
* `/api/v2/playlist/personalRecommendation` : get personal recommended medias.
* `userId` (optional, string): `UserId` to use for a personal recommendation.
* Returns a `recommendedList` object.

Expand Down
44 changes: 36 additions & 8 deletions docs/RECOMMENDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,43 @@ Playfff is the middleware to deliver recommendations for Play SRG mobile applica

Since July 2018, Play Android (2.0.207 and more) and Play iOS (2.8.3-272 and more) applications currently use this recommendation service.

## Recommendation type

### Media recommendation list for a media
## Media recommendation list for a media

The API doesn't not support paginations, therefore mobile applications didn't implement pagination. The media recommendation list must have at least 49 items, the 50th is the requested media.

#### RTS videos
### Purposes

- `continuousPlayback` is used to display one proposition, with a count down and an autoplay.
- `relatedContent` is used to display some propositions in a swimlane or a grid, without an autoplay.

| BU Content | Continuous playback | Related content |
| :--- | :---: | :---: |
| RSI audios | Pfff RE | Pfff RE |
| RSI videos | Pfff RE | Pfff RE |
| RTR audios | Pfff RE | Pfff RE |
| RTR videos | Pfff RE | Pfff RE |
| RTS audios | Pfff RE | Pfff RE |
| RTS videos | **RTS RE** | **RTS RE** |
| SRF audios | Pfff RE | **SRF RE** |
| SRF videos | Pfff RE | **SRF RE** |
| SWI videos | Pfff RE | Pfff RE |
| Event videos | N/A | N/A |
| Swisstxt videos | N/A | N/A |

### Recommendation engines used

#### RTS recommendation engine (RTS RE)

- For RTS videos, it asks `rts-datalab.azure-api` recommendation `continuous_playback_endscreen` service.
- For RTS videos, it can ask `rts-datalab.azure-api` recommendation `continuous_playback_endscreen` service, without personalization.

#### RSI, RTR, SRF, SWI videos and RSI, RTR, RTS and SRF audios
#### SRF recommendation engine (SRF RE)

- It asks Playfff recommendation. Based on IL requests, without personalization. Here is how it works:
- For SRF videos and SRF audios, it can ask `IL-MediaList` recommendation `Recommended-byUrn` service, without personalization.

#### Playfff recommendation engine (Pfff RE)

- For RSI, RTR, RTS, SRF, SWI videos and RSI, RTR, RTS, SRF audios, it can ask `Playfff` recommendation.
- Based on IL requests, without personalization. Here is how it works:
- Get `IL-Media`. It returns an empty list if it's a `LIVESTREAM` or a `SCHEDULED_LIVESTREAM`.
- Get `IL-EpisodeComposition` with last 100 episodes. Sort episodes with a date ascending order.
- Determine if the media is a full length or a clip.
Expand All @@ -40,10 +64,14 @@ The API doesn't not support paginations, therefore mobile applications didn't im

- No recommendation provided. It returns an empty list.

### Media recommendation list for a user
## Media recommendation list for a user

The API doesn't not support paginations, therefore mobile applications didn't implement pagination. The media recommendation list must have at least 50 items.

#### RTS

- With and without an `userId`, it asks `rts-datalab.azure-api` recommendation `play_home_personal_rec` service.

#### Other BUs

- Nothing implemented.

0 comments on commit 933ff09

Please sign in to comment.