Hi there!
I am trying to fetch a record label's top and latest releases. For example, for "Big Machine Label Group", I can see the top and latest releases on Apple Music.
I get the latest and top releases if I use the endpoint to get a catalog record label and query parameters to extend.
https://api.music.apple.com/v1/catalog/us/record-labels/1552967199?views=top-releases,latest-releases
However, I am getting nil
for these values using MusicCatalogResourceRequest
. Here's the code:
let request = MusicCatalogResourceRequest<RecordLabel>(matching: \.id, equalTo: "1552967199")
let response = try await request.response()
guard let recordLabel = response.items.first else { return }
print(recordLabel.topReleases)
print(recordLabel.latestReleases)
I cannot add properties for these either to get detailed info because I think there is no PartialMusicProperty
when Root
is RecordLabel
.
Can you point me to what I am doing wrong?