~ubuntuone-client-engineering/ubuntuone-music-java-library/trunk

« back to all changes in this revision

Viewing changes to src/main/com/ubuntuone/api/music/json/U1AlbumJson.java

  • Committer: Michał Karnicki
  • Date: 2012-11-12 15:28:49 UTC
  • Revision ID: michal.karnicki@canonical.com-20121112152849-cuqc03rdltf73kpi
Updated to align to changes in v2 of the music API. Added create and update playlist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
                g.writeStringField("id", album.getId());
50
50
                g.writeStringField("album_url", album.getAlbumUrl());
51
51
                g.writeStringField("artist", album.getArtist());
 
52
                g.writeStringField("artist_id", album.getArtistId());
52
53
                g.writeStringField("title", album.getTitle());
53
54
                g.writeNumberField("parsed_date", album.getParsedDate());
54
55
                g.writeStringField("album_art_url", album.getAlbumArtUrl());
72
73
                        String id = null;
73
74
                        String albumUrl = null;
74
75
                        String artist = null;
 
76
                        String artistId = null;
75
77
                        String title = null;
76
78
                        Long parsedDate = null;
77
79
                        String albumArtUrl = null;
91
93
                                        albumUrl = jp.getText();
92
94
                                } else if ("artist".equals(field)) {
93
95
                                        artist = jp.getText();
 
96
                                } else if ("artist_id".equals(field)) {
 
97
                                        artistId = jp.getText();
94
98
                                } else if ("title".equals(field)) {
95
99
                                        title = jp.getText();
96
100
                                } else if ("parsed_date".equals(field)) {
114
118
                                }
115
119
                        }
116
120
                        
117
 
                        U1Album album = new U1Album(id, albumUrl, artist, title, parsedDate,
118
 
                                        albumArtUrl, year);
 
121
                        U1Album album = new U1Album(id, albumUrl, artist, artistId, title,
 
122
                                        parsedDate, albumArtUrl, year);
119
123
                        
120
124
                        callback.onSuccess(album);
121
125
                }