尝试使用web在播放列表中列出歌曲,我得到108首歌曲(?)。我在播放列表中看到了大约100个限制。
debian:~/user$ curl -Ss -H "Authorization: Bearer atkn" https://api.spotify.com/v1/users/bugenwilla/playlists|jq -r '.items[]|select(.name=="myplaylist")|[.tracks.total, .id]'
[
1543,
"playlistid"
]
debian:~/user$ curl -Ss -H "Authorization: Bearer atkn" https://api.spotify.com/v1/users/username/playlists/playlistid/tracks | jq -r '.items[] | .track.album.artists[].name' | wc -l
108
debian:~/user$ curl -Ss -H "Authorization: Bearer atkn" https://api.spotify.com/v1/users/username/playlists/playlistid/tracks | jq -r '.limit, .total'
100
1543( 1)为什么它显示108首歌曲而不是限制100首? 2)是否有办法改变播放列表中所有1543首歌曲的限制/显示所有1543首歌曲?
发布于 2017-12-24 23:20:00
offset的查询参数。默认为0。将其设置为100,将给你下一百首歌曲。https://api.spotify.com/v1/users/username/playlists/playlistid/tracks?offset=100https://stackoverflow.com/questions/47955411
复制相似问题