-
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 music charts
- Loading branch information
1 parent
4394944
commit 7c26bab
Showing
15 changed files
with
270 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build and test | ||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
build: | ||
name: Build and test | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11.0.4 | ||
|
||
- name: Build and test | ||
run: | | ||
./gradlew :build --stacktrace | ||
env: | ||
TEAM_ID: ${{ secrets.TEAM_ID }} | ||
KEY_ID: ${{ secrets.KEY_ID }} | ||
PRIVATE_KEY_BASE64: ${{ secrets.PRIVATE_KEY_BASE64 }} |
This file was deleted.
Oops, something went wrong.
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
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
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/com/stevesoltys/applemusic/model/album/AlbumChartResponse.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,7 @@ | ||
package com.stevesoltys.applemusic.model.album | ||
|
||
class AlbumChartResponse( | ||
val chart: String, | ||
val name: String, | ||
data: Array<Album> = emptyArray() | ||
) : AlbumResponse(data) |
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: 8 additions & 0 deletions
8
src/main/kotlin/com/stevesoltys/applemusic/model/chart/ChartResponse.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.chart | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class ChartResponse( | ||
val results: ChartResults | ||
) |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/stevesoltys/applemusic/model/chart/ChartResultType.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.chart | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
enum class ChartResultType(val identifier: String) { | ||
ALBUMS("albums"), | ||
MUSIC_VIDEOS("music-videos"), | ||
PLAYLISTS("playlists"), | ||
SONGS("songs") | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/kotlin/com/stevesoltys/applemusic/model/chart/ChartResults.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.chart | ||
|
||
import com.stevesoltys.applemusic.model.album.AlbumChartResponse | ||
import com.stevesoltys.applemusic.model.artist.ArtistResponse | ||
import com.stevesoltys.applemusic.model.track.song.SongChartResponse | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
class ChartResults( | ||
val albums: Array<AlbumChartResponse> = emptyArray(), | ||
val songs: Array<SongChartResponse> = emptyArray() | ||
) |
9 changes: 9 additions & 0 deletions
9
src/main/kotlin/com/stevesoltys/applemusic/model/chart/ChartType.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.chart | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
enum class ChartType(val identifier: String) { | ||
CITY_CHARTS("cityCharts"), | ||
DAILY_GLOBAL_TOP_CHARTS("dailyGlobalTopCharts") | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/SongChartResponse.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,7 @@ | ||
package com.stevesoltys.applemusic.model.track.song | ||
|
||
class SongChartResponse( | ||
val chart: String, | ||
val name: String, | ||
data: Array<Song> = emptyArray() | ||
) : SongResponse(data) |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/com/stevesoltys/applemusic/model/track/song/SongResponse.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 | ||
|
||
import com.stevesoltys.applemusic.model.ResponseRoot | ||
|
||
/** | ||
* @author Steve Soltys | ||
*/ | ||
open class SongResponse( | ||
val data: Array<Song> = emptyArray() | ||
) : 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
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
Oops, something went wrong.