Official Elixir SDK for Rocksky.
A thin wrapper over the :rocksky_erl Rustler NIF (the shared Rust core,
rocksky-sdk): AppView reads, AT Protocol PDS writes (scrobble fan-out, like,
follow, shout) and the identity hashes — the same engine behind every Rocksky
SDK.
Reads/writes return {:ok, value} | {:error, message} with binary-keyed
maps (the wire shape). Records passed to the write verbs are maps with
camelCase binary keys — "title", "artist", "album", "albumArtist",
"durationMs", …
{:ok, stats} = Rocksky.global_stats()
Rocksky.song_hash("Chaser", "Calibro 35", "Jazzploitation")
Summary
Functions
Follow an account by DID.
Universal read escape hatch — call any app.rocksky.* query by nsid.
Platform-wide totals.
Keep the local dedup index hydrated from Jetstream in the background.
Like a record by strong reference.
Log in with an app password, persisting the session at session_path.
Returns an opaque agent handle (a NIF resource freed by GC).
Resolve full canonical metadata for a bare title + artist (matchSong).
An actor's detailed profile.
Proactively refresh the session (keep-alive).
Scrobble a play (fans out to artist/album/song/scrobble). Returns the URIs.
Scrobble from just a title + artist (album optional): resolve full metadata via matchSong, then fan out.
An actor's scrobbles, newest first.
Post a shout on a subject.
Identity hash of a song — identical across every Rocksky SDK.
Download the caller's repo and (re)build the local dedup index (needs a dedup_path at login).
Top artists chart over a typed date window (see top_tracks_interval/4).
Platform-wide top tracks chart.
Top tracks chart over a typed date window.
Functions
Follow an account by DID.
Universal read escape hatch — call any app.rocksky.* query by nsid.
params is a map of string params; the whole read-query catalog is reachable.
Rocksky.get("app.rocksky.album.getAlbum", %{"uri" => uri})
Rocksky.get("app.rocksky.charts.getScrobblesChart", %{"did" => did})
Platform-wide totals.
Keep the local dedup index hydrated from Jetstream in the background.
Like a record by strong reference.
Log in with an app password, persisting the session at session_path.
Returns an opaque agent handle (a NIF resource freed by GC).
Resolve full canonical metadata for a bare title + artist (matchSong).
An actor's detailed profile.
Proactively refresh the session (keep-alive).
Scrobble a play (fans out to artist/album/song/scrobble). Returns the URIs.
Scrobble from just a title + artist (album optional): resolve full metadata via matchSong, then fan out.
An actor's scrobbles, newest first.
Post a shout on a subject.
Identity hash of a song — identical across every Rocksky SDK.
Download the caller's repo and (re)build the local dedup index (needs a dedup_path at login).
Top artists chart over a typed date window (see top_tracks_interval/4).
Platform-wide top tracks chart.
Top tracks chart over a typed date window.
interval is :all | {:days, n} | {:weeks, n} | {:months, n} |
{:years, n} | {:range, start_rfc3339, end_rfc3339}.
Rocksky.top_tracks_interval(10, 0, {:days, 7})