Skip to main content
rocksky_ex is a pipe-friendly Elixir client built on Req.

Install

Quick start

The client is the first argument so calls compose naturally with |>. Each namespace module mirrors a lexicon — app.rocksky.actor.getProfile becomes Rocksky.Actor.get_profile/2.

Configuration

Or globally:
Derive an authenticated client from a shared base:

Create a scrobble

Builder style

Camel-cased lexicon keys become snake-cased setters (album_art/2, mb_id/2, spotify_link/2). new/1 and put/2 accept either form. Use put/2 to set several at once and to_body/1 to inspect the JSON body without submitting. Missing required fields are caught locally:

Find a song

Player remote-control

Paginate with Stream

Errors

Modules

Generic escape hatch:

Types

Lexicon-derived structs are available under Rocksky.Generated.*, mirroring every lex *View* / *Record / *Input / *Output / *Params shape from the Rocksky lexicons. Regenerate with bun run lexgen:types at the repo root.

License

MIT © Tsiry Sandratraina. Source: sdk/elixir.