-
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.
- Loading branch information
1 parent
a111251
commit d01e219
Showing
7 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/stevesoltys/applemusic/model/album/AlbumRelationships.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,11 +1,14 @@ | ||
package com.stevesoltys.applemusic.model.album | ||
|
||
import com.stevesoltys.applemusic.model.artist.ArtistRelationship | ||
import com.stevesoltys.applemusic.model.track.TrackRelationship | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class AlbumRelationships { | ||
|
||
var artists: ArtistRelationship? = null | ||
|
||
val tracks: TrackRelationship? = null | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/kotlin/com/stevesoltys/applemusic/model/track/Track.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,23 @@ | ||
package com.stevesoltys.applemusic.model.track | ||
|
||
import com.fasterxml.jackson.annotation.JsonSubTypes | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo | ||
import com.stevesoltys.applemusic.model.Resource | ||
import com.stevesoltys.applemusic.model.track.musicvideo.MusicVideo | ||
import com.stevesoltys.applemusic.model.track.song.Song | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.NAME, | ||
include = JsonTypeInfo.As.PROPERTY, | ||
property = "type" | ||
) | ||
@JsonSubTypes( | ||
value = [ | ||
JsonSubTypes.Type(value = Song::class, name = "songs"), | ||
JsonSubTypes.Type(value = MusicVideo::class, name = "musicVideos") | ||
] | ||
) | ||
abstract class Track : Resource() |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/stevesoltys/applemusic/model/track/TrackRelationship.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 | ||
|
||
import com.stevesoltys.applemusic.model.Relationship | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class TrackRelationship : Relationship() { | ||
|
||
var data: Array<Track>? = null | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/com/stevesoltys/applemusic/model/track/musicvideo/MusicVideo.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.musicvideo | ||
|
||
import com.stevesoltys.applemusic.model.track.Track | ||
|
||
/** | ||
* TODO | ||
* | ||
* @author Steve Soltys | ||
*/ | ||
class MusicVideo : Track() |
13 changes: 13 additions & 0 deletions
13
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/Song.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,13 @@ | ||
package com.stevesoltys.applemusic.model.track.song | ||
|
||
import com.stevesoltys.applemusic.model.track.Track | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class Song : Track() { | ||
|
||
var relationships: SongRelationships? = null | ||
|
||
var attributes: SongAttributes? = null | ||
} |
51 changes: 51 additions & 0 deletions
51
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/SongAttributes.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,51 @@ | ||
package com.stevesoltys.applemusic.model.track.song | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty | ||
import com.stevesoltys.applemusic.model.Artwork | ||
import com.stevesoltys.applemusic.model.EditorialNotes | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class SongAttributes { | ||
|
||
var albumName: String? = null | ||
|
||
var artistName: String? = null | ||
|
||
var artwork: Artwork? = null | ||
|
||
var composerName: String? = null | ||
|
||
var contentRating: String? = null | ||
|
||
var discNumber: Int? = null | ||
|
||
var durationInMillis: Long? = null | ||
|
||
var editorialNotes: EditorialNotes? = null | ||
|
||
var genreNames: Array<String>? = null | ||
|
||
var isrc: String? = null | ||
|
||
var movementCount: Int? = null | ||
|
||
var movementName: String? = null | ||
|
||
var movementNumber: Int? = null | ||
|
||
var name: String? = null | ||
|
||
// TODO: Play parameters | ||
|
||
// TODO: Previews | ||
|
||
var releaseDate: String? = null | ||
|
||
var trackNumber: Int? = null | ||
|
||
var url: String? = null | ||
|
||
var workName: String? = null | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/SongRelationships.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,14 @@ | ||
package com.stevesoltys.applemusic.model.track.song | ||
|
||
import com.stevesoltys.applemusic.model.album.AlbumRelationship | ||
import com.stevesoltys.applemusic.model.artist.ArtistRelationship | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class SongRelationships { | ||
|
||
var artists: ArtistRelationship? = null | ||
|
||
var albums: AlbumRelationship? = null | ||
} |