Class GetUsersTopTracksRequest

java.lang.Object
de.sonallux.spotify.api.apis.users.GetUsersTopTracksRequest

public class GetUsersTopTracksRequest extends Object

Get User's Top Tracks request

Required OAuth scopes

user-top-read

Response

Pages of tracks

  • Constructor Details

    • GetUsersTopTracksRequest

      public GetUsersTopTracksRequest(ApiClient apiClient)
      Get User's Top Tracks request
      Parameters:
      apiClient -

      The API client

  • Method Details

    • timeRange

      public GetUsersTopTracksRequest timeRange(String timeRange)
      Parameters:
      timeRange -

      Over what time frame the affinities are computed. Valid values: long_term (calculated from several years of data and including all new data as it becomes available), medium_term (approximately last 6 months), short_term (approximately last 4 weeks). Default: medium_term

      Returns:
      this request
    • limit

      public GetUsersTopTracksRequest limit(int limit)
      Parameters:
      limit -

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

      Returns:
      this request
    • offset

      public GetUsersTopTracksRequest offset(int offset)
      Parameters:
      offset -

      The index of the first item to return. Default: 0 (the first item). Use with limit to get the next set of items.

      Returns:
      this request
    • build

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