Merge lp:~ubuntuone-client-engineering/ubuntuone-music-java-library/update-stream-paths into lp:ubuntuone-music-java-library

Proposed by Michał Karnicki on 2012-11-08
Status: Merged
Merged at revision: 27
Proposed branch: lp:~ubuntuone-client-engineering/ubuntuone-music-java-library/update-stream-paths
Merge into: lp:ubuntuone-music-java-library
Diff against target: 38 lines (+2/-4)
3 files modified
src/main/com/ubuntuone/api/music/U1MusicAPI.java (+0/-1)
src/main/com/ubuntuone/api/music/client/StreamingClient.java (+1/-2)
src/test/com/ubuntuone/api/music/GetSongStreamTest.java (+1/-1)
To merge this branch: bzr merge lp:~ubuntuone-client-engineering/ubuntuone-music-java-library/update-stream-paths
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve on 2012-11-08
Brian Curtin (community) 2012-11-08 Approve on 2012-11-08
Review via email: mp+133512@code.launchpad.net

Description of the change

Update song stream path.

To post a comment you must log in.
Brian Curtin (brian.curtin) wrote :

Looks ok to me.

review: Approve
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/main/com/ubuntuone/api/music/U1MusicAPI.java'
2--- src/main/com/ubuntuone/api/music/U1MusicAPI.java 2012-09-28 02:04:22 +0000
3+++ src/main/com/ubuntuone/api/music/U1MusicAPI.java 2012-11-08 16:27:03 +0000
4@@ -85,7 +85,6 @@
5 public static final String PLAYLISTS = "playlists";
6
7 protected static final String RESOURCE_HOST = "one.ubuntu.com";
8- // TODO karni: Set this to proper streaming host when streaming handler is ready.
9 protected static final String STREAMING_HOST = "streaming.one.ubuntu.com";
10
11 private final ResourceClient resourceClient;
12
13=== modified file 'src/main/com/ubuntuone/api/music/client/StreamingClient.java'
14--- src/main/com/ubuntuone/api/music/client/StreamingClient.java 2012-09-28 02:04:22 +0000
15+++ src/main/com/ubuntuone/api/music/client/StreamingClient.java 2012-11-08 16:27:03 +0000
16@@ -52,8 +52,7 @@
17
18 @Override
19 public String getPath(String songId) {
20- // TODO karni: Set this to proper streaming path when streaming handler is ready.
21- return String.format("/stream/%s/", songId);
22+ return String.format("%s/songs/%s", API_PATH, songId);
23 }
24
25 public HttpResponse download(String path, long offset,
26
27=== modified file 'src/test/com/ubuntuone/api/music/GetSongStreamTest.java'
28--- src/test/com/ubuntuone/api/music/GetSongStreamTest.java 2012-09-19 19:17:30 +0000
29+++ src/test/com/ubuntuone/api/music/GetSongStreamTest.java 2012-11-08 16:27:03 +0000
30@@ -106,7 +106,7 @@
31 final long offset = 0L;
32
33 final HttpGet httpRequest =
34- new HttpGet("https://streaming.one.ubuntu.com/stream/" + song.getId() + "/");
35+ new HttpGet("https://streaming.one.ubuntu.com/api/music/v2/songs/" + song.getId());
36
37 String songContent = "song_content";
38 final InputStream instream = new ByteArrayInputStream(songContent.getBytes("UTF-8"));

Subscribers

People subscribed via source and target branches