Skip to content

Commit

Permalink
Add support for ExternalIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
strideynet committed Jan 3, 2023
1 parent 8d3038a commit 22d435b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions track.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import (
"time"
)

type TrackExternalIDs struct {
ISRC string `json:"isrc"`
EAN string `json:"ean"`
UPC string `json:"upc"`
}

// SimpleTrack contains basic info about a track.
type SimpleTrack struct {
Artists []SimpleArtist `json:"artists"`
Expand All @@ -23,6 +29,8 @@ type SimpleTrack struct {
Explicit bool `json:"explicit"`
// External URLs for this track.
ExternalURLs map[string]string `json:"external_urls"`
// ExternalIDs are IDs for this track in other databases
ExternalIDs TrackExternalIDs `json:"external_ids"`
// A link to the Web API endpoint providing full details for this track.
Endpoint string `json:"href"`
ID ID `json:"id"`
Expand Down

0 comments on commit 22d435b

Please sign in to comment.