-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for fetching user library albums and songs
- Loading branch information
1 parent
389e214
commit 52674d7
Showing
23 changed files
with
249 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/com/stevesoltys/applemusic/model/PlayParameters.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.stevesoltys.applemusic.model | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class PlayParameters( | ||
val id: String, | ||
val kind: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/stevesoltys/applemusic/model/album/library/LibraryAlbum.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.stevesoltys.applemusic.model.album.library | ||
|
||
import com.stevesoltys.applemusic.model.Resource | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibraryAlbum( | ||
val attributes: LibraryAlbumAttributes? = null, | ||
val relationships: LibraryAlbumRelationships? = null | ||
) : Resource() |
8 changes: 8 additions & 0 deletions
8
.../kotlin/com/stevesoltys/applemusic/model/album/library/LibraryAlbumArtistsRelationship.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.stevesoltys.applemusic.model.album.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
import com.stevesoltys.applemusic.model.artist.library.LibraryArtist | ||
|
||
data class LibraryAlbumArtistsRelationship( | ||
val data: List<LibraryArtist> | ||
) : Relationship() |
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/com/stevesoltys/applemusic/model/album/library/LibraryAlbumAttributes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.stevesoltys.applemusic.model.album.library | ||
|
||
import com.stevesoltys.applemusic.model.Artwork | ||
import com.stevesoltys.applemusic.model.PlayParameters | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibraryAlbumAttributes( | ||
val artistName: String, | ||
val artwork: Artwork, | ||
val contentRating: String? = null, | ||
val dateAdded: String? = null, | ||
val name: String, | ||
val playParams: PlayParameters? = null, | ||
val releaseDate: String? = null, | ||
val trackCount: Int, | ||
val genreNames: List<String> | ||
) |
8 changes: 8 additions & 0 deletions
8
.../kotlin/com/stevesoltys/applemusic/model/album/library/LibraryAlbumCatalogRelationship.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.stevesoltys.applemusic.model.album.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
import com.stevesoltys.applemusic.model.album.Album | ||
|
||
data class LibraryAlbumCatalogRelationship( | ||
val data: List<Album> | ||
) : Relationship() |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/stevesoltys/applemusic/model/album/library/LibraryAlbumRelationships.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.stevesoltys.applemusic.model.album.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibraryAlbumRelationships( | ||
val artists: LibraryAlbumArtistsRelationship? = null, | ||
val catalog: LibraryAlbumCatalogRelationship? = null | ||
) : Relationship() |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/com/stevesoltys/applemusic/model/album/library/LibraryAlbumResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.stevesoltys.applemusic.model.album.library | ||
|
||
import com.stevesoltys.applemusic.model.ResponseRoot | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibraryAlbumResponse( | ||
val data: List<LibraryAlbum> | ||
) : ResponseRoot() |
2 changes: 1 addition & 1 deletion
2
...usic/model/libraryartist/LibraryArtist.kt → ...sic/model/artist/library/LibraryArtist.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../libraryartist/LibraryArtistAttributes.kt → ...artist/library/LibraryArtistAttributes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...tist/LibraryArtistsCatalogRelationship.kt → ...brary/LibraryArtistCatalogRelationship.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package com.stevesoltys.applemusic.model.libraryartist | ||
package com.stevesoltys.applemusic.model.artist.library | ||
|
||
import com.stevesoltys.applemusic.model.Resource | ||
import com.stevesoltys.applemusic.model.artist.Artist | ||
|
||
data class LibraryArtistsCatalogRelationship( | ||
data class LibraryArtistCatalogRelationship( | ||
val data: List<Artist> | ||
) : Resource() |
10 changes: 10 additions & 0 deletions
10
...main/kotlin/com/stevesoltys/applemusic/model/artist/library/LibraryArtistRelationships.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.stevesoltys.applemusic.model.artist.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibraryArtistRelationships( | ||
val catalog: LibraryArtistCatalogRelationship? = null | ||
) : Relationship() |
2 changes: 1 addition & 1 deletion
2
...el/libraryartist/LibraryArtistResponse.kt → ...l/artist/library/LibraryArtistResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/main/kotlin/com/stevesoltys/applemusic/model/libraryartist/LibraryArtistRelationships.kt
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/library/LibrarySong.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.Resource | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibrarySong( | ||
val attributes: LibrarySongAttributes? = null, | ||
val relationships: LibrarySongRelationships? = null | ||
) : Resource() |
9 changes: 9 additions & 0 deletions
9
...tlin/com/stevesoltys/applemusic/model/track/song/library/LibrarySongAlbumsRelationship.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
import com.stevesoltys.applemusic.model.album.library.LibraryAlbum | ||
import com.stevesoltys.applemusic.model.artist.library.LibraryArtist | ||
|
||
data class LibrarySongAlbumsRelationship( | ||
val data: List<LibraryAlbum> | ||
) : Relationship() |
8 changes: 8 additions & 0 deletions
8
...lin/com/stevesoltys/applemusic/model/track/song/library/LibrarySongArtistsRelationship.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
import com.stevesoltys.applemusic.model.artist.library.LibraryArtist | ||
|
||
data class LibrarySongArtistsRelationship( | ||
val data: List<LibraryArtist> | ||
) : Relationship() |
22 changes: 22 additions & 0 deletions
22
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/library/LibrarySongAttributes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.Artwork | ||
import com.stevesoltys.applemusic.model.PlayParameters | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibrarySongAttributes( | ||
val albumName: String? = null, | ||
val artistName: String, | ||
val artwork: Artwork, | ||
val contentRating: String? = null, | ||
val discNumber: Int? = null, | ||
val durationInMillis: Int, | ||
val genreNames: List<String>, | ||
val hasLyrics: Boolean, | ||
val name: String, | ||
val playParams: PlayParameters? = null, | ||
val releaseDate: String? = null, | ||
val trackNumber: Int? = null | ||
) |
10 changes: 10 additions & 0 deletions
10
...lin/com/stevesoltys/applemusic/model/track/song/library/LibrarySongCatalogRelationship.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
import com.stevesoltys.applemusic.model.Resource | ||
import com.stevesoltys.applemusic.model.album.Album | ||
import com.stevesoltys.applemusic.model.track.song.Song | ||
|
||
data class LibrarySongCatalogRelationship( | ||
val data: List<Song> | ||
) : Relationship() |
12 changes: 12 additions & 0 deletions
12
...in/kotlin/com/stevesoltys/applemusic/model/track/song/library/LibrarySongRelationships.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibrarySongRelationships( | ||
val albums: LibrarySongAlbumsRelationship? = null, | ||
val artists: LibrarySongArtistsRelationship? = null, | ||
val catalog: LibrarySongCatalogRelationship? = null | ||
) : Relationship() |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/library/LibrarySongResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.stevesoltys.applemusic.model.track.song.library | ||
|
||
import com.stevesoltys.applemusic.model.ResponseRoot | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
data class LibrarySongResponse( | ||
val data: List<LibrarySong> | ||
) : ResponseRoot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters