Hi there!
How do I go about accessing the details of the curator?
For example, if I hit the following endpoint to access details about a playlist:
https://api.music.apple.com/v1/catalog/us/playlists/pl.047294ae14a24e5993d1f7ab2b127188
Then, in the response, I see the curator containing the ID under relationships:
"curator": {
"href": "/v1/catalog/us/playlists/pl.047294ae14a24e5993d1f7ab2b127188/curator",
"data": [
{
"id": "976439548",
"type": "apple-curators",
"href": "/v1/catalog/us/apple-curators/976439548"
}
]
}
Using this ID, I can get more information like the editorial notes, kind, artwork, etc.
If I use MusicKit to get details about the playlist:
let id = MusicItemID("pl.047294ae14a24e5993d1f7ab2b127188")
let request = MusicCatalogResourceRequest<Playlist>(matching: \.id, equalTo: id)
let response = try await request.response()
guard let playlist = response.items.first else { return }
print(playlist.curatorName)
It does not expose the Curator
object but only the curatorName
.
How can I access the ID of the curator?