app.rocksky:rocksky-kotlin binds the shared Rocksky Rust core via UniFFI
(JNA-loaded), package app.rocksky: AppView reads, AT Protocol PDS writes, a
local dedup index, and the identity hashes — the same engine behind every
Rocksky SDK.
Install
Quickstart
API
Reads —AppView(base: String? = null, token: String? = null) (pass token
to send Authorization: Bearer on auth-gated queries; counts are UInt). Typed
views: profile, scrobbles, songs, albums, artists, lovedSongs,
catalogAlbums / catalogArtists / catalogSongs, albumTracks,
artistAlbums / artistTracks, scrobbleFeed, scrobble (single), follows /
followers / knownFollowers, topTracks, topArtists, globalStats.
Date-window charts topTracksInterval(limit, offset, interval) and
topArtistsInterval(...) take a DateInterval (AllTime, LastDays(7u),
LastWeeks, LastMonths, LastYears, Range(start, end)).
matchSong(title, artist, mbId, isrc) resolves a bare title+artist to canonical
metadata. A raw-JSON long tail (album, artist, song, playlists,
playlist, stats, wrapped, scrobblesChart, recommendations,
neighbours, shouts, …) returns JSON strings, and av.get(nsid, mapOf(...))
calls any read query by NSID.
Writes — Agent: login(...) (top-level, appview/dedupPath optional),
then scrobble (full metadata) or scrobbleMatch(ScrobbleMatchInput(title, artist, album, mbId, isrc, timestamp)) (resolve via matchSong, then fan out —
title/artist required, album/mbId/isrc are String? and timestamp
is Long?, all default null; ScrobbleMatchInput is an app.rocksky
typealias), createSong / createAlbum /
createArtist, like / unlike, follow / unfollow, shout / replyShout,
setNowPlaying / clearNowPlaying, syncRepo (dedup backfill, returns
per-collection counts as JSON), hydrateFromJetstream (live dedup off the
firehose). Write verbs throw RockskyException.
Identity hashes: songHash, albumHash, artistHash.