Skip to content

Commit 22d435b

Browse files
committed
Add support for ExternalIDs
1 parent 8d3038a commit 22d435b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

track.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import (
88
"time"
99
)
1010

11+
type TrackExternalIDs struct {
12+
ISRC string `json:"isrc"`
13+
EAN string `json:"ean"`
14+
UPC string `json:"upc"`
15+
}
16+
1117
// SimpleTrack contains basic info about a track.
1218
type SimpleTrack struct {
1319
Artists []SimpleArtist `json:"artists"`
@@ -23,6 +29,8 @@ type SimpleTrack struct {
2329
Explicit bool `json:"explicit"`
2430
// External URLs for this track.
2531
ExternalURLs map[string]string `json:"external_urls"`
32+
// ExternalIDs are IDs for this track in other databases
33+
ExternalIDs TrackExternalIDs `json:"external_ids"`
2634
// A link to the Web API endpoint providing full details for this track.
2735
Endpoint string `json:"href"`
2836
ID ID `json:"id"`

0 commit comments

Comments
 (0)