GitXplorerGitXplorer
e

Musikt

public
1 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
cf433b9d636857446aa9168d6cdf41c9b139fca7

Clean up

eegorzhdan committed 7 years ago
Unverified
7921eec64bb2774306e50fdd32cb0f9dacf386fb

Use References for loading related objects

eegorzhdan committed 7 years ago
Unverified
f52c4334841e06ddfeb8c6d9df1022428166eade

Move functions

eegorzhdan committed 7 years ago
Unverified
1bc54778a138a8a9098c758d24837e76d77d6e3c

Introduce References

eegorzhdan committed 7 years ago
Unverified
613f22a55b4c07fce852f9f93bc725bb762adcbe

Basic requests for Album objects

eegorzhdan committed 7 years ago
Unverified
531a8535e7cd00a5cc3d97b22550f8ddbbdff9d8

Add readme

eegorzhdan committed 7 years ago

README

The README file for this repository.

Musikt – Apple Music API for Kotlin

// Retrieve an artist by ID:
val a = AppleMusic.getArtist("178834")    // returns an Artist instance
println(a.name)                           // prints "Bruce Springsteen"
println(a.genreNames.joinToString())      // prints "Rock"
val b = a.albums                          // list of references to albums
val c = b.first().fetch()                 // loads and returns an Album

// Retrieve an album by ID:
val a = AppleMusic.getAlbum("310730204")  // returns an Album instance
print(a.name)                             // prints "Born to Run"
print(a.artistName)                       // prints "Bruce Springsteen"
print(a.editorialNotes?.short)

Musikt utilizes Kotlin coroutines to retrieve data from the API asynchronously without using callbacks/futures/rx. All the functions requesting external resources are suspending.

Getting started

In order to use the Apple Music API, you need to generate a private key on the Apple Developer website. Read more...

Before your application starts making requests to the API, set up your Team ID and private key:

Credentials.teamID = "team"
Credentials.privateKey = "key"