How does MusicKit love/unlove a song?
Kejiasir opened this issue · 2 comments
Kejiasir commented
rudrankriyam commented
Heya! MusicKit does not have a rating API as of yet.
However, you can use MusadoraKit for this purpose. For example, to add a Love rating for a particular song, you can do so by:
let id: MusicItemID = "1628890886"
let request = MusicCatalogRatingAddRequest<Song>(matching: \.id, equalTo: id, rating: .loved)
let response = try await request.response()
print(response.items)
If it is a success, you will get the rating that contains the identifier of the music item, and the rating.
Let me know if you use it!
Kejiasir commented
wow, awesome, this helped me, thank you.