Something went wrong. Try again.
A decentralized music tracking and discovery platform built on AT Protocol 🎵
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435# frozen_string_literal: true
# Read-only tour of the native Rocksky core (no auth needed).## ruby -Ilib examples/native_core.rb## Needs the native lib — run ./build-core.sh first.# The write side (login + scrobble) is shown commented at the bottom.require "rocksky"
stats = Rocksky.global_statsputs "global: #{stats["scrobbles"]} scrobbles · #{stats["users"]} users · #{stats["tracks"]} tracks"
puts "top tracks:"Rocksky.top_tracks(limit: 5).each do |t| puts " #{t["artist"]} — #{t["title"]}"end
puts "song hash: #{Rocksky.song_hash("Chaser", "Calibro 35", "Jazzploitation")}"
# --- write side (uncomment with real credentials) ---# agent = Rocksky::Agent.login("session.json", "alice.bsky.social", "app-pw")# out = agent.scrobble(# "title" => "Chaser", "artist" => "Calibro 35",# "album" => "Jazzploitation", "albumArtist" => "Calibro 35", "durationMs" => 182_320# )# puts "scrobbled: #{out["scrobbleUri"]}"# agent.close
# --- library: your uploaded music (needs an access token) ---# lib = Rocksky.library("YOUR_ACCESS_TOKEN")# puts lib.get_genres# puts lib.get_album_list("newest", size: 10)# puts lib.get_song("<song-id>")