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

LikedPage

func LikedPage(addr address, offset, limit int) []int

LikedPage lists a listener's liked track ids, newest tracks first, paginated. Likes are keyed by track id, so this is the newest music the listener liked, not the order of their likes (that needs an index per like, which would add to every like's storage deposit).

Params

Command

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

Result