Module discogs

Source
Expand description

Discogs label profiles reached through a MusicBrainz URL relationship.

This module parses identifiers and responses without making requests. The CLI decides when a reader explicitly asks to go online.

Constants§

MAX_AGE_SECONDS
Keep a margin below the API terms’ six-hour display limit.
REQUEST_INTERVAL
At most 24 requests per minute, below the unauthenticated limit of 25.
SOURCE
Source name in the attributed layer.

Functions§

api_url
Fixed API endpoint for a label ID already checked against a Discogs URL.
artist_api_url
Fixed API endpoint for an artist named in a label profile.
artist_name
The name from an artist lookup must belong to the requested ID.
fresh
Whether a stored answer is young enough to display under the API terms.
label_id
Accept only a Discogs label URL and use its numeric identifier on our own fixed API host. No URL found in external metadata is fetched directly.
label_name
The name from a second label lookup must belong to the requested ID.
label_url
Public page to cite beside a Discogs profile.
profile
A label’s profile is CC0 data under Discogs’ API terms. The display also prints the required “Data provided by Discogs.” notice beside the text.
referenced_artists
Artist IDs named by Discogs’ [a123] markup, in first-use order.
referenced_labels
IDs named by Discogs’ [l123] label-link markup, in first-use order.
render_profile
Plain-text presentation of the Discogs profile. Unknown and malformed markup is retained so a source’s ordinary bracketed text is not lost.