Hi,
I am trying to use MusicDataRequest
from MusicKit to get the user's library artists (https://api.music.apple.com/v1/me/library/artists
).
This works well, until I am trying to use pagination with it.
The data returned by this endpoint contains a "next" property, which reads /v1/me/library/artists?offset=25
.
Replacing the URL as such resulting in https://api.music.apple.com/v1/me/library/artists?offset=25
no longer works, as the request returns an error:
MusicDataRequest.Error(
status: 400,
code: 40008,
title: "Invalid Path Value",
detailText: "Unknown library resource type 'artists?offset=25'",
...
)
It seems like the request cannot handle query parameters and considers them as part of the request's path.
Is there any way to use query parameters with MusicDataRequest
?
Thanks for any response.