Rocksky (Rocksky v0.4.0)

Copy Markdown View Source

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.

Platform-wide totals.

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).

An actor's detailed profile.

Proactively refresh the session (keep-alive).

Scrobble a play (fans out to artist/album/song/scrobble). Returns the URIs.

An actor's scrobbles, newest first.

Identity hash of a song — identical across every Rocksky SDK.

Platform-wide top tracks chart.

Functions

follow(agent, did)

Follow an account by DID.

global_stats(base \\ "")

Platform-wide totals.

like(agent, uri, cid)

Like a record by strong reference.

login(session_path, identifier, password, appview \\ "")

Log in with an app password, persisting the session at session_path. Returns an opaque agent handle (a NIF resource freed by GC).

profile(actor, base \\ "")

An actor's detailed profile.

refresh_session(agent)

Proactively refresh the session (keep-alive).

scrobble(agent, track)

Scrobble a play (fans out to artist/album/song/scrobble). Returns the URIs.

scrobbles(actor, limit \\ 50, offset \\ 0, base \\ "")

An actor's scrobbles, newest first.

shout(agent, subject_uri, subject_cid, message)

Post a shout on a subject.

song_hash(title, artist, album)

Identity hash of a song — identical across every Rocksky SDK.

top_tracks(limit \\ 50, offset \\ 0, base \\ "")

Platform-wide top tracks chart.