Skip to content

Commit

Permalink
Merge pull request #44 from SRGSSR/develop
Browse files Browse the repository at this point in the history
Release RTS recommendation update
  • Loading branch information
pyby authored May 27, 2020
2 parents ac7ba2d + ddcbbfd commit a7e4d84
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/RECOMMENDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The API doesn't not support paginations, therefore mobile applications didn't im

#### RTS videos

- For RTS videos, it asks Peach recommendation `continuous_playback_mobile` service.
- For RTS videos, it asks `rts-datalab.azure-api` recommendation `continuous_playback_endscreen` service.

#### RSI, RTR, SRF, SWI videos and RSI, RTR, RTS and SRF audios

Expand Down Expand Up @@ -46,4 +46,4 @@ The API doesn't not support paginations, therefore mobile applications didn't im

#### RTS

- With and without an `userId`, it asks Peach recommendation `play_home_personal_rec` service.
- With and without an `userId`, it asks `rts-datalab.azure-api` recommendation `play_home_personal_rec` service.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>ch.srgssr</groupId>
<artifactId>playfff</artifactId>
<version>22</version>
<version>23</version>
<packaging>jar</packaging>

<name>pfff</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ else if (index == -1 && clipUrns.size() == 0) {

private RecommendedList rtsVideoRecommendedList(String purpose, String urn, boolean standalone) {
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.newInstance().scheme("https")
.host("peach.ebu.io").path("api/v1/chrts/continuous_playback_mobile");
.host("rts-datalab.azure-api.net").path("rts-datalab-api/continuous_playback_endscreen");
uriComponentsBuilder.queryParam("urn", urn);
uriComponentsBuilder.queryParam("purpose", purpose);
uriComponentsBuilder.queryParam("pageSize", 49);
Expand All @@ -184,7 +184,7 @@ private RecommendedList rtsVideoRecommendedList(String purpose, String urn, bool

public RecommendedList rtsPlayHomePersonalRecommendation(String userId) {
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.newInstance().scheme("https")
.host("peach.ebu.io").path("api/v1/chrts/play_home_personal_rec");
.host("rts-datalab.azure-api.net").path("rts-datalab-api/play_home_personal_rec");
uriComponentsBuilder.queryParam("user_id", userId);
UriComponents url = uriComponentsBuilder.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void getRecommendedUrnsContinuousplaybackRTSVideoTest() {
RecommendedList recommendedList = recommendationService.getRecommendedUrns(purpose, mediaURN, standalone);

Assert.assertNotNull(recommendedList.getRecommendationId());
Assert.assertTrue(recommendedList.getRecommendationId().startsWith("io.ebu.peach:"));
Assert.assertTrue(recommendedList.getRecommendationId().startsWith("net.azure-api.rts-datalab:"));
assertValidList(recommendedList);
}

Expand All @@ -36,7 +36,7 @@ public void getRecommendedUrnsContinuousplaybackStandaloneRTSVideoTest() {
RecommendedList recommendedList = recommendationService.getRecommendedUrns(purpose, mediaURN, standalone);

Assert.assertNotNull(recommendedList.getRecommendationId());
Assert.assertTrue(recommendedList.getRecommendationId().startsWith("io.ebu.peach:"));
Assert.assertTrue(recommendedList.getRecommendationId().startsWith("net.azure-api.rts-datalab:"));
assertValidList(recommendedList);
}

Expand Down Expand Up @@ -151,8 +151,8 @@ public void playHomeTestUserUnknown() {
}

@Test
public void playHomeTestUser9() {
RecommendedList recommendedList = recommendationService.rtsPlayHomePersonalRecommendation("9");
public void playHomeTestUser203656() {
RecommendedList recommendedList = recommendationService.rtsPlayHomePersonalRecommendation("203656");

assertValidList(recommendedList);
}
Expand Down

0 comments on commit a7e4d84

Please sign in to comment.