Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

catalog/v1 package

Overview

Package catalog is GnoRadio's catalog rules, release 1: artists, tracks, albums, playlists, likes, follows, tips, support, moderation and verification. Other GnoRadio realms (radio, tickets, home) read it through the value getters in read.gno; it imports none of them.

It keeps no state but its admin role. Every record lives in the data realm (gno.land/r/nym-alexiscolin000/gnoradio/data), in the "catalog/…" collections only the current catalog writer may change (db.gno). Promo budgets sit in data's vault, so a later release takes over the data and the coins without copying anything.

Four track origins share one catalog:

  • "artist": published by the artist's own wallet, tips enabled;
  • "curated": imported by the admin from CC0 / CC BY / CC BY-SA / CC BY-NC / CC BY-NC-SA sources;
  • "audius", "jamendo": pointers the admin imports. The record keeps only what the radio needs (platform id, genre, duration, licence); the app reads title, artist and cover live, since both platforms' API terms allow session caching only (attribution required).

Imported artists start unclaimed; once the admin assigns them to a wallet (AssignArtist) or the robot verifies a claim, their tracks receive tips.

Tips and support are forwarded in the same transaction: this realm ends every transaction holding no coins.

Function

AlbumsJSON

func AlbumsJSON(offset, limit int) string

AlbumsJSON returns visible albums with ids offset+1..offset+limit (at most 100).

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-alexiscolin000/gnoradio/catalog/v1.AlbumsJSON(,)"

Result