GitXplorerGitXplorer
e

Musikt

public
1 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
e46a76e1b55180b2df203077a83af6f413db20f5

Basic requests for Artist objects

eegorzhdan committed 7 years ago
Unverified
78eb7bee12ae70f660d35fa37c1af7a58d37ff84

HTTP Requests to Apple Music API

eegorzhdan committed 7 years ago
Unverified
91a5b3e8f7bd9415abb170ef7f9a9fcdb9034aeb

Update modules

eegorzhdan committed 7 years ago
Unverified
d67e72d1c63958bfd17c06eda38d4caba76319ca

Simple HTTP Request class with coroutines

eegorzhdan committed 7 years ago
Unverified
fb210f1b448eab73625622abd04838331bb93023

Introduce core & networking modules

eegorzhdan committed 7 years ago
Unverified
9739cbe5ce568ffaede6bc490ba650a10a01e198

Add gitignore

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"