public class GetCurrentUsersRecentlyPlayedTracksRequest extends AbstractDataRequest<PagingCursorbased<PlayHistory>>
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.
Any tracks listened to while the user had "Private Session" enabled in their client will not be returned in the list of recently played tracks.
The endpoint uses a bidirectional cursor for paging. Follow the next field with the before parameter
to move back in time, or use the after parameter to move forward in time. If you supply no before or
after parameter, the endpoint will return the most recently played songs, and the next
link will page back in time.
| Modifier and Type | Class and Description |
|---|---|
static class |
GetCurrentUsersRecentlyPlayedTracksRequest.Builder
Builder class for building a
GetCurrentUsersRecentlyPlayedTracksRequest. |
| Modifier and Type | Method and Description |
|---|---|
PagingCursorbased<PlayHistory> |
execute()
Get an user's recently played tracks.
|
bodyParametersToJson, deleteJson, executeAsync, getBody, getBodyParameters, getContentType, getHeaders, getHttpManager, getJson, getUri, initializeBody, postJson, putJsonpublic PagingCursorbased<PlayHistory> execute() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
IOException - In case of networking issues.SpotifyWebApiException - The Web API returned an error further specified in this exception's root cause.org.apache.hc.core5.http.ParseExceptionCopyright © 2020. All rights reserved.