我正在尝试为用户获取艺术家列表。在 0.x Api 中这很容易,但现在我做不到。
require([
'$api/models',
'$api/location#Location',
'$api/library#Library',
'$api/search#Search',
'$api/toplists#Toplist',
'$views/buttons',
'$views/list#List',
'$views/image#Image'
], function(models, Location, Library, Search, Toplist, buttons, List, Image) {
var librarys = Library.forCurrentUser();
console.log("LIBRARY", librarys);
librarys.load("artists").done(
function(artists) {
console.log(artists);
artists.load('owner').done(function(snapshot) {
console.log("SNAP",snapshot);
});
});
});
我得到了回应,"Library.forCurrentUser();"
但接下来我尝试的一切都失败了。没有错误或其他东西,但也"librarys.load("artists")"
没有"librarys.snapshot()"
工作。