Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stevesoltys/apple-music
An Apple Music API wrapper.
https://github.com/stevesoltys/apple-music
api apple apple-music apple-music-api music
Last synced: 2 months ago
JSON representation
An Apple Music API wrapper.
- Host: GitHub
- URL: https://github.com/stevesoltys/apple-music
- Owner: stevesoltys
- License: mit
- Created: 2020-08-28T05:49:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-21T07:24:40.000Z (2 months ago)
- Last Synced: 2024-11-21T07:30:43.379Z (2 months ago)
- Topics: api, apple, apple-music, apple-music-api, music
- Language: Kotlin
- Homepage:
- Size: 89.8 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Apple Music
[![Build Status](https://travis-ci.org/stevesoltys/apple-music.svg?branch=master)](https://travis-ci.org/github/stevesoltys/apple-music)An [Apple Music API](https://developer.apple.com/documentation/applemusicapi/) wrapper.
## Installation
```groovy
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}dependencies {
compile 'com.github.stevesoltys:apple-music:0.1.0'
}
```## Usage
Create an `AppleMusic` instance with your credentials, and run an API query.Here's an example:
```kotlin
val appleMusic = AppleMusic(
teamId = "A93J3NMCK2",
privateKey = Files.readAllBytes(Path.of("private.key")),
keyId = "S019516J93",
storefront = "us"
)val searchResultArtist = appleMusic.search(
"j cole", types = setOf(SearchResultType.ARTISTS)
).results?.artists?.data?.first()val artistAlbums = appleMusic.getAllAlbumsByArtistId(searchResultArtist!!.id!!)
// ...
```## License
This library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).