ClientPersonalizationApi

class ClientPersonalizationApi(api: GenericSpotifyApi) : SpotifyEndpoint

Endpoints for retrieving information about the user’s listening habits.

Api Reference

Constructors

ClientPersonalizationApi
Link copied to clipboard
common
fun ClientPersonalizationApi(api: GenericSpotifyApi)

Types

TimeRange
Link copied to clipboard
common
enum TimeRange : Enum<ClientPersonalizationApi.TimeRange>
The time frame for which attribute affinities are computed.

Functions

getTopArtists
Link copied to clipboard
common
suspend fun getTopArtists(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, timeRange: ClientPersonalizationApi.TimeRange? = null): PagingObject<Artist>
Get the current user’s top artists based on calculated affinity.
getTopArtistsRestAction
Link copied to clipboard
common
fun getTopArtistsRestAction(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, timeRange: ClientPersonalizationApi.TimeRange? = null): SpotifyRestAction<PagingObject<Artist>>
Get the current user’s top artists based on calculated affinity.
getTopTracks
Link copied to clipboard
common
suspend fun getTopTracks(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, timeRange: ClientPersonalizationApi.TimeRange? = null): PagingObject<Track>
Get the current user’s top tracks based on calculated affinity.
getTopTracksRestAction
Link copied to clipboard
common
fun getTopTracksRestAction(limit: Int? = api.spotifyApiOptions.defaultLimit, offset: Int? = null, timeRange: ClientPersonalizationApi.TimeRange? = null): SpotifyRestAction<PagingObject<Track>>
Get the current user’s top tracks based on calculated affinity.

Properties

api
Link copied to clipboard
common
val api: GenericSpotifyApi
cache
Link copied to clipboard
common
val cache: SpotifyCache

Sources

common source
Link copied to clipboard