Resources
Resource Models
Song, album, and artist model shapes.
Song
interface Song extends Resource {
type: "song";
attributes: {
name: string;
albumName?: string;
artistName?: string;
isrc?: string;
artworkUrl?: string;
trackNumber?: number;
discNumber?: number;
genres?: string[];
releaseDate?: string;
durationMs?: number;
};
relationships?: {
albums?: List<Album>;
artists?: List<Artist>;
};
}Album
interface Album extends Resource {
type: "album";
attributes: {
name: string;
trackCount: number;
artistName?: string;
artworkUrl?: string;
upc?: string;
genres?: string[];
releaseDate?: string;
};
relationships?: {
artists?: List<Artist>;
};
}Artist
interface Artist extends Resource {
type: "artist";
attributes: {
name: string;
artworkUrl?: string;
};
}