rocksky is a stdlib-only Ruby client for the Rocksky API.
app.rocksky.actor.getProfile becomes client.actor.get_profile(...).
app.rocksky.scrobble.createScrobble becomes
client.scrobble.create_scrobble(...). Kwargs in, parsed JSON out.
Install
net/http, json, uri).
Quick start
with_token derives a new client without mutating the original — handy when a
single base client is shared across users in a web app:
Resources
For anything not covered:
Conventions
- Keyword args for every parameter. Ruby
snake_casemaps to the lexicon’scamelCase(start_date:→startDate). nilis dropped. Passnilfor any optional param and it won’t be sent.- Arrays are CSV-joined. Lexicon list params accept Ruby arrays.
- Hashes in, hashes out. Responses come back as plain
Hash(string keys), mirroring the lexicon JSON 1:1.
Errors
Configuration
IRB console
Types
Lexicon-derivedStruct types 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/ruby.