Well it's using promises, so you can just await those.
But agreed, the documentation looks like it was written in 2014/2015.
But agreed, the documentation looks like it was written in 2014/2015.
https://developer.apple.com/documentation/musickitjs#3004817
music.authorize().then(function() {
music.api.library.albums.then(function(cloudAlbums) {
// user's cloudAlbums
});
});
Should be:
music.authorize().then(function() {
return music.api.library.albums;
}).then(function (cloudAlbums) {
// user's cloudAlbums
});