0
我試圖通過創建API的Spotify一個臨時的播放列表與此代碼的臨時播放列表:Spotify的API - 創建
var playlist = models.Playlist.createTemporary("My temporary playlist");
models.Playlist.createTemporary("My temporary playlist").load('tracks').done(function(playlist) {
playlist.tracks.add(models.Track.fromURI("spotify:track:4VqPOruhp5EdPBeR92t6lQ"));
playlist.tracks.add(models.Track.fromURI("spotify:track:5HF5PRNJ8KGtbzNPPc93tG"));
});
var list = List.forPlaylist(playlist);
document.getElementById('playlistContainer').appendChild(list.node);
list.init();
但我發現了以下錯誤:
core.js:4 - Uncaught TypeError: Object #<Promise> has no method 'load'
任何想法我做錯了什麼?謝謝。