Class GetRecentlyPlayedRequest

java.lang.Object
de.sonallux.spotify.api.apis.player.GetRecentlyPlayedRequest

public class GetRecentlyPlayedRequest extends Object

Get Recently Played Tracks request

Required OAuth scopes

user-read-recently-played

Response

A paged set of tracks

  • Constructor Details

    • GetRecentlyPlayedRequest

      public GetRecentlyPlayedRequest(ApiClient apiClient)
      Get Recently Played Tracks request
      Parameters:
      apiClient -

      The API client

  • Method Details

    • limit

      public GetRecentlyPlayedRequest limit(int limit)
      Parameters:
      limit -

      The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

      Returns:
      this request
    • after

      public GetRecentlyPlayedRequest after(int after)
      Parameters:
      after -

      A Unix timestamp in milliseconds. Returns all items after (but not including) this cursor position. If after is specified, beforemust not be specified.

      Returns:
      this request
    • before

      public GetRecentlyPlayedRequest before(int before)
      Parameters:
      before -

      A Unix timestamp in milliseconds. Returns all items before (but not including) this cursor position. If before is specified, after must not be specified.

      Returns:
      this request
    • build

      public ApiCall<CursorPaging<PlayHistory>> build()
      Build the request into an executable api call
      Returns:
      an executable api call