Spotify api 最近播放的分页
Spotify api recently played paging
当我用这个 URL 获取我的收听历史时:https://api.spotify.com/v1/me/player/recently-played?limit=50
我从响应中获取一个 "next" 属性以获取以前的数据。
当我用这个 "next" url(即 https://api.spotify.com/v1/me/player/recently-played?before=1557334757252&limit=50)获取 API 时,它 returns 是一个空的音轨数组。
我不明白为什么我得到的是一个空数组。
PS : 明明听了50多首歌
Returns the most recent 50 tracks played by a user. Note that a track
currently playing will not be visible in play history until it has
completed. A track must be played for more than 30 seconds to be
included in play history.
Spotify 仅存储 50 个最近的曲目信息。由于您已经检索了 50 条记录,因此在 之后或之前使用 没有用 cursor.Use 限制不是 50 那么您可以使用游标。
当我用这个 URL 获取我的收听历史时:https://api.spotify.com/v1/me/player/recently-played?limit=50
我从响应中获取一个 "next" 属性以获取以前的数据。
当我用这个 "next" url(即 https://api.spotify.com/v1/me/player/recently-played?before=1557334757252&limit=50)获取 API 时,它 returns 是一个空的音轨数组。
我不明白为什么我得到的是一个空数组。
PS : 明明听了50多首歌
Returns the most recent 50 tracks played by a user. Note that a track currently playing will not be visible in play history until it has completed. A track must be played for more than 30 seconds to be included in play history.
Spotify 仅存储 50 个最近的曲目信息。由于您已经检索了 50 条记录,因此在 之后或之前使用 没有用 cursor.Use 限制不是 50 那么您可以使用游标。