A Kotlin-first client built on Ktor +Documentation Index
Fetch the complete documentation index at: https://docs.rocksky.app/llms.txt
Use this file to discover all available pages before exploring further.
kotlinx.serialization.
- Suspending functions, default parameters, builder DSL,
AutoCloseable - Every endpoint returns a
@Serializabledata class - Every model field is nullable, unknown JSON keys are ignored
- 4xx / 5xx responses become typed exceptions
- JVM 17+; bring your own Ktor engine (CIO is the default)
Install
./gradlew :rocksky:publishToMavenLocal and use mavenLocal().
Quick start
Three styles for create methods
Heavier write endpoints (scrobble.create, song.create, playlist.create,
shout.create, apiKey.create) come in three flavors — pick whichever reads
best:
send() — calling without them throws
IllegalStateException before any HTTP call.
Authenticated calls
client.setToken("…").
Surface
| Resource | Methods (highlights) |
|---|---|
client.actor | getProfile, getAlbums, getArtists, getSongs, getScrobbles, getLovedSongs, getPlaylists, getNeighbours, getCompatibility |
client.album | get, list, getTracks |
client.apiKey | list, create, update, remove |
client.artist | get, list, getAlbums, getTracks, getListeners, getRecentListeners |
client.charts | topTracks, topArtists, scrobblesChart |
client.feed | get, getGenerator, listGenerators, search, stories, recommendations, artistRecommendations, albumRecommendations |
client.graph | follow, unfollow, getFollowers, getFollows, getKnownFollowers |
client.like | likeSong, dislikeSong, likeShout, dislikeShout |
client.player | play, pause, next, previous, seek, playFile, playDirectory, currentlyPlaying, queue, addItemsToQueue |
client.playlist | get, list, create, remove, start, insertFiles, insertDirectory |
client.scrobble | get, list, create |
client.shout | create, reply, remove, report, forProfile, forAlbum, forArtist, forTrack, replies |
client.song | get, list, match, create, getRecentListeners |
Errors
TransportException. Every exception extends
RockskyException.
Configuration
Types
Public model types are derived from the Rocksky lexicons and live inapp.rocksky.generated. The app.rocksky.Models typealiases re-export them under their historical names; Profile, ApiKey, and FollowList extend with SDK-specific fields. Regenerate with bun run lexgen:types at the repo root.
License
MIT © Tsiry Sandratraina. Source:sdk/kotlin.