Albums
Album Models
The album resource types used across the OpenMusic API.
BaseAlbum
Minimal album resource shape used for view=minimal and nested relationships.
interface BaseAlbum extends ResourceBase {
type: "albums";
meta: {
omm_id: string | null;
};
relationships?: {
tracks?: (Song | BaseSong)[];
artists?: (Artist | BaseArtist)[];
};
}Album
Full album resource returned when attributes are requested; extends BaseAlbum.
interface Album extends BaseAlbum {
attributes: AlbumAttributes;
}AlbumAttributes
Full metadata fields attached to Album.
artist_name is a fallback display field for cases where artist relationships
are unavailable.
It should also be populated by implementations that do expose artist
relationships, whenever the value is available.
interface AlbumAttributes {
name: string;
artist_name: string | null;
upc: string | null;
artwork_url: string | null;
track_count: number | null;
genres: string[];
release_date: string | null;
}