Package com. adamratzman. spotify. models
Types
AbstractPagingObject
Link copied to clipboard
abstract class AbstractPagingObject<T : Any, Z : AbstractPagingObject<T, Z>> : PagingObjectBase<T, Z> , List<T?>
Content copied to clipboard
Album
Link copied to clipboard
data class Album(albumTypeString: String, availableMarketsString: List<String>, externalIdsString: Map<String, String>, externalUrlsString: Map<String, String>, href: String, id: String, uri: AlbumUri, artists: List<SimpleArtist>, copyrights: List<SpotifyCopyright>, genres: List<String>, images: List<SpotifyImage>, label: String, name: String, popularity: Int, releaseDateString: String, releaseDatePrecision: String, tracks: PagingObject<SimpleTrack>, type: String, totalTracks: Int, restrictions: Restrictions?) : CoreObject
Content copied to clipboard
AlbumResultType
Link copied to clipboard
AlbumUri
Link copied to clipboard
AlbumUriSerializer
Link copied to clipboard
Artist
Link copied to clipboard
ArtistUri
Link copied to clipboard
ArtistUriSerializer
Link copied to clipboard
AudioAnalysis
Link copied to clipboard
data class AudioAnalysis(bars: List<TimeInterval>, beats: List<TimeInterval>, meta: AudioAnalysisMeta, sections: List<AudioSection>, segments: List<AudioSegment>, tatums: List<TimeInterval>, track: TrackAnalysis)
Content copied to clipboard
AudioAnalysisMeta
Link copied to clipboard
AudioFeatures
Link copied to clipboard
data class AudioFeatures(acousticness: Float, analysisUrl: String, danceability: Float, durationMs: Int, energy: Float, id: String, instrumentalness: Float, key: Int, liveness: Float, loudness: Float, mode: Int, speechiness: Float, tempo: Float, timeSignature: Int, trackHref: String, type: String, uri: PlayableUri, valence: Float)
Content copied to clipboard
General attributes of a Track
AudioSection
Link copied to clipboard
AudioSegment
Link copied to clipboard
AuthenticationError
Link copied to clipboard
CollectionUri
Link copied to clipboard
Represents a Spotify Collection URI (one of PlaylistUri or ImmutableCollectionUri), parsed from either a Spotify ID or taken from an endpoint.
CollectionUriSerializer
Link copied to clipboard
ContextUri
Link copied to clipboard
ContextUriSerializer
Link copied to clipboard
CopyrightType
Link copied to clipboard
CoreObject
Link copied to clipboard
CurrentlyPlayingContext
Link copied to clipboard
data class CurrentlyPlayingContext(timestamp: Long, device: Device, progressMs: Int?, isPlaying: Boolean, track: Track?, shuffleState: Boolean, repeatStateString: String, context: SpotifyContext?)
Content copied to clipboard
CurrentlyPlayingObject
Link copied to clipboard
data class CurrentlyPlayingObject(context: SpotifyContext?, timestamp: Long, progressMs: Int?, isPlaying: Boolean, track: Track?, currentlyPlayingTypeString: String, actions: PlaybackActions)
Content copied to clipboard
CurrentlyPlayingType
Link copied to clipboard
CursorBasedPagingObject
Link copied to clipboard
DeviceType
Link copied to clipboard
DisallowablePlaybackAction
Link copied to clipboard
data class DisallowablePlaybackAction(action: PlaybackAction, disallowed: Boolean)
Content copied to clipboard
Episode
Link copied to clipboard
data class Episode(audioPreviewUrl: String?, description: String?, durationMs: Int, explicit: Boolean, externalUrlsString: Map<String, String>, href: String, id: String, images: List<SpotifyImage>, isExternallyHosted: Boolean, isPlayable: Boolean, language: String?, showLanguagesPrivate: List<String>, name: String, releaseDateString: String, releaseDatePrecisionString: String, resumePoint: ResumePoint?, show: SimpleShow, type: String, uri: EpisodeUri) : CoreObject
Content copied to clipboard
EpisodeUri
Link copied to clipboard
EpisodeUriSerializer
Link copied to clipboard
ErrorObject
Link copied to clipboard
ErrorResponse
Link copied to clipboard
ExplicitContentSettings
Link copied to clipboard
data class ExplicitContentSettings(filterEnabled: Boolean, filterLocked: Boolean)
Content copied to clipboard
ExternalId
Link copied to clipboard
ExternalUrl
Link copied to clipboard
FeaturedPlaylists
Link copied to clipboard
data class FeaturedPlaylists(message: String, playlists: PagingObject<SimplePlaylist>)
Content copied to clipboard
Identifiable
Link copied to clipboard
IdentifiableNullable
Link copied to clipboard
ImmutableCollectionUri
Link copied to clipboard
ImmutableCollectionUriSerializer
Link copied to clipboard
object ImmutableCollectionUriSerializer : KSerializer<ImmutableCollectionUri>
Content copied to clipboard
ISpotifyUri
Link copied to clipboard
interface ISpotifyUri
Content copied to clipboard
LinkedTrack
Link copied to clipboard
data class LinkedTrack(externalUrlsString: Map<String, String>, href: String, id: String, uri: PlayableUri, type: String) : CoreObject
Content copied to clipboard
Represents a relinked track.
LocalTrack
Link copied to clipboard
data class LocalTrack(album: SimpleLocalAlbum, artists: List<SimpleLocalArtist>, href: String?, id: String?, discNumber: String?, durationMs: Int?, explicit: Boolean?, isLocal: Boolean, name: String, popularity: Int?, trackNumber: Int?, type: String, uri: LocalTrackUri) : IdentifiableNullable, Playable
Content copied to clipboard
LocalTrackUri
Link copied to clipboard
LocalTrackUriSerializer
Link copied to clipboard
NeedsApi
Link copied to clipboard
NullablePagingObject
Link copied to clipboard
class NullablePagingObject<T : Any>(href: String, items: List<T?>, limit: Int, next: String?, offset: Int, previous: String?, total: Int) : AbstractPagingObject<T, NullablePagingObject<T>>
Content copied to clipboard
PagingObject
Link copied to clipboard
data class PagingObject<T : Any>(href: String, items: List<T>, limit: Int, next: String?, offset: Int, previous: String?, total: Int) : AbstractPagingObject<T, PagingObject<T>>
Content copied to clipboard
PagingObjectBase
Link copied to clipboard
abstract class PagingObjectBase<T : Any, Z : PagingObjectBase<T, Z>> : NeedsApi, List<T?>
Content copied to clipboard
PagingTraversalType
Link copied to clipboard
PlayableSerializer
Link copied to clipboard
PlayableUri
Link copied to clipboard
Represents a Spotify Playable URI (one of SpotifyTrackUri, LocalTrackUri, or EpisodeUri), parsed from either a Spotify ID or taken from an endpoint.
PlayableUriSerializer
Link copied to clipboard
PlaybackAction
Link copied to clipboard
PlaybackActions
Link copied to clipboard
PlayHistory
Link copied to clipboard
data class PlayHistory(track: SimpleTrack, playedAt: String, context: SpotifyContext?)
Content copied to clipboard
Playlist
Link copied to clipboard
data class Playlist(externalUrlsString: Map<String, String>, href: String, id: String, uri: PlaylistUri, collaborative: Boolean, description: String?, followers: Followers, primaryColor: String?, images: List<SpotifyImage>, name: String, owner: SpotifyPublicUser, public: Boolean?, snapshotIdString: String, tracks: PagingObject<PlaylistTrack>, type: String) : CoreObject
Content copied to clipboard
PlaylistTrack
Link copied to clipboard
data class PlaylistTrack(primaryColor: String?, addedAt: String?, addedBy: SpotifyPublicUser?, isLocal: Boolean?, track: Playable?, videoThumbnail: VideoThumbnail?)
Content copied to clipboard
Represents a Spotify track inside a Playlist
PlaylistTrackInfo
Link copied to clipboard
PlaylistUri
Link copied to clipboard
PlaylistUriSerializer
Link copied to clipboard
PodcastEpisodeTrack
Link copied to clipboard
data class PodcastEpisodeTrack(album: SimpleAlbum, artists: List<SimpleArtist>, availableMarketsString: List<String>, discNumber: Int, durationMs: Int, episode: Boolean?, explicit: Boolean, externalUrlsString: Map<String, String>, externalIdsString: Map<String, String>, href: String, id: String, isLocal: Boolean?, isPlayable: Boolean, name: String, popularity: Int, previewUrl: String?, track: Boolean?, trackNumber: Int, type: String, uri: PlayableUri, linkedTrack: LinkedTrack?) : RelinkingAvailableResponse, Playable
Content copied to clipboard
RecommendationResponse
Link copied to clipboard
data class RecommendationResponse(seeds: List<RecommendationSeed>, tracks: List<Track>)
Content copied to clipboard
RecommendationSeed
Link copied to clipboard
data class RecommendationSeed(href: String?, id: String, initialPoolSize: Int, afterFilteringSize: Int, afterRelinkingSize: Int?, type: String) : Identifiable
Content copied to clipboard
ReleaseDate
Link copied to clipboard
RelinkingAvailableResponse
Link copied to clipboard
Restrictions
Link copied to clipboard
ResultEnum
Link copied to clipboard
interface ResultEnum
Content copied to clipboard
ResumePoint
Link copied to clipboard
SavedAlbum
Link copied to clipboard
SavedEpisode
Link copied to clipboard
SavedShow
Link copied to clipboard
SavedTrack
Link copied to clipboard
Show
Link copied to clipboard
data class Show(availableMarketsString: List<String>, copyrights: List<SpotifyCopyright>, description: String?, explicit: Boolean, episodes: NullablePagingObject<SimpleEpisode>, externalUrlsString: Map<String, String>, href: String, id: String, images: List<SpotifyImage>, isExternallyHosted: Boolean?, languagesString: List<String>, mediaType: String, name: String, publisher: String, type: String, uri: ShowUri) : CoreObject
Content copied to clipboard
ShowUri
Link copied to clipboard
ShowUriSerializer
Link copied to clipboard
SimpleAlbum
Link copied to clipboard
data class SimpleAlbum(albumTypeString: String, availableMarketsString: List<String>, externalUrlsString: Map<String, String>, href: String, id: String, uri: SpotifyUri, artists: List<SimpleArtist>, images: List<SpotifyImage>, name: String, type: String, restrictions: Restrictions?, releaseDateString: String, releaseDatePrecisionString: String, totalTracks: Int?, albumGroupString: String?) : CoreObject
Content copied to clipboard
Simplified Album object that can be used to retrieve a full Album
SimpleArtist
Link copied to clipboard
data class SimpleArtist(externalUrlsString: Map<String, String>, href: String, id: String, uri: SpotifyUri, name: String, type: String) : CoreObject
Content copied to clipboard
Simplified Artist object that can be used to retrieve a full Artist
SimpleEpisode
Link copied to clipboard
data class SimpleEpisode(audioPreviewUrl: String?, description: String?, durationMs: Int, explicit: Boolean, externalUrlsString: Map<String, String>, href: String, id: String, images: List<SpotifyImage>, isExternallyHosted: Boolean, isPlayable: Boolean, language: String?, showLanguagesPrivate: List<String>, name: String, releaseDateString: String, releaseDatePrecisionString: String, resumePoint: ResumePoint?, type: String, uri: SpotifyUri) : CoreObject
Content copied to clipboard
SimpleLocalAlbum
Link copied to clipboard
data class SimpleLocalAlbum(albumType: String?, artists: List<SimpleLocalArtist>, name: String, releaseDate: String?, releaseDatePrecision: String?, type: String)
Content copied to clipboard
Local album object that goes with LocalTrack - represents the local album it was obtained from (likely "Local Files")
SimpleLocalArtist
Link copied to clipboard
SimplePlaylist
Link copied to clipboard
data class SimplePlaylist(externalUrlsString: Map<String, String>, href: String, id: String, uri: SpotifyUri, collaborative: Boolean, images: List<SpotifyImage>, name: String, description: String?, owner: SpotifyPublicUser, primaryColor: String?, public: Boolean?, snapshotIdString: String, tracks: PlaylistTrackInfo, type: String) : CoreObject
Content copied to clipboard
Simplified Playlist object that can be used to retrieve a full Playlist
SimpleShow
Link copied to clipboard
data class SimpleShow(availableMarketsString: List<String>, externalUrlsString: Map<String, String>, copyrights: List<SpotifyCopyright>, description: String?, explicit: Boolean, href: String, id: String, images: List<SpotifyImage>, isExternallyHosted: Boolean?, languagesString: List<String>, mediaType: String, name: String, publisher: String, type: String, uri: SpotifyUri) : CoreObject
Content copied to clipboard
SimpleTrack
Link copied to clipboard
data class SimpleTrack(externalUrlsString: Map<String, String>, availableMarketsString: List<String>, externalIdsString: Map<String, String>, href: String, id: String, uri: SpotifyUri, artists: List<SimpleArtist>, discNumber: Int, durationMs: Int, explicit: Boolean, isPlayable: Boolean, linkedTrack: LinkedTrack?, name: String, previewUrl: String?, trackNumber: Int, type: String, isLocal: Boolean?, popularity: Int?, restrictions: Restrictions?) : RelinkingAvailableResponse
Content copied to clipboard
Simplified Playlist object that can be used to retrieve a full Playlist
SpotifyCategory
Link copied to clipboard
data class SpotifyCategory(href: String, id: String, icons: List<SpotifyImage>, name: String) : Identifiable
Content copied to clipboard
SpotifyContext
Link copied to clipboard
data class SpotifyContext(externalUrlsString: Map<String, String>, href: String, uri: ContextUri, typeString: String)
Content copied to clipboard
SpotifyContextType
Link copied to clipboard
SpotifyCopyright
Link copied to clipboard
SpotifyImage
Link copied to clipboard
SpotifyPublicUser
Link copied to clipboard
data class SpotifyPublicUser(externalUrlsString: Map<String, String>, href: String, id: String, uri: UserUri, displayName: String?, followers: Followers, images: List<SpotifyImage>, type: String) : CoreObject
Content copied to clipboard
SpotifyRatelimitedException
Link copied to clipboard
class SpotifyRatelimitedException(time: Long) : SpotifyException.UnNullableException
Content copied to clipboard
Thrown when SpotifyApiOptions.retryWhenRateLimited is false and requests have been ratelimited
SpotifySearchResult
Link copied to clipboard
data class SpotifySearchResult(albums: PagingObject<SimpleAlbum>?, artists: PagingObject<Artist>?, playlists: PagingObject<SimplePlaylist>?, tracks: PagingObject<Track>?, episodes: NullablePagingObject<SimpleEpisode>?, shows: NullablePagingObject<SimpleShow>?)
Content copied to clipboard
SpotifyTrackUri
Link copied to clipboard
SpotifyTrackUriSerializer
Link copied to clipboard
SpotifyUri
Link copied to clipboard
Represents any Spotify URI (one of ArtistUri, PlayableUri, ImmutableCollectionUri, UserUri, PlaylistUri), parsed from either a Spotify ID or taken from an endpoint.
SpotifyUriException
Link copied to clipboard
class SpotifyUriException(message: String) : SpotifyException.BadRequestException
Content copied to clipboard
SpotifyUriSerializer
Link copied to clipboard
SpotifyUserInformation
Link copied to clipboard
data class SpotifyUserInformation(externalUrlsString: Map<String, String>, href: String, id: String, uri: UserUri, country: String?, displayName: String?, email: String?, followers: Followers, images: List<SpotifyImage>, product: String?, explicitContentSettings: ExplicitContentSettings?, type: String) : CoreObject
Content copied to clipboard
TimeInterval
Link copied to clipboard
data class TimeInterval(start: Float, duration: Float, confidence: Float)
Content copied to clipboard
TokenValidityResponse
Link copied to clipboard
data class TokenValidityResponse(isValid: Boolean, exception: Exception?)
Content copied to clipboard
Track
Link copied to clipboard
data class Track(externalUrlsString: Map<String, String>, externalIdsString: Map<String, String>, availableMarketsString: List<String>, href: String, id: String, uri: PlayableUri, album: SimpleAlbum, artists: List<SimpleArtist>, isPlayable: Boolean, discNumber: Int, durationMs: Int, explicit: Boolean, linkedTrack: LinkedTrack?, name: String, popularity: Int, previewUrl: String?, trackNumber: Int, type: String, isLocal: Boolean?, restrictions: Restrictions?, episode: Boolean?, track: Boolean?) : RelinkingAvailableResponse, Playable
Content copied to clipboard
TrackAnalysis
Link copied to clipboard
data class TrackAnalysis(numSamples: Int, duration: Float, sampleMd5: String?, offsetSeconds: Int?, windowSeconds: Int?, analysisSampleRate: Float, analysisChannels: Int, endOfFadeIn: Float, startOfFadeOut: Float, loudness: Float, tempo: Float, tempoConfidence: Float, timeSignature: Int, timeSignatureConfidence: Float, key: Int, keyConfidence: Float, mode: Int?, modeConfidence: Float, codestring: String, codeVersion: Float, echoprintstring: String, echoprintVersion: Float, synchstring: String, synchVersion: Float, rhythmstring: String, rhythmVersion: Float)
Content copied to clipboard
UserUri
Link copied to clipboard
UserUriSerializer
Link copied to clipboard
VideoThumbnail
Link copied to clipboard
Functions
toAlbumUri
Link copied to clipboard
toArtistUri
Link copied to clipboard
toCollectionUri
Link copied to clipboard
Convert a collection (playlist/ImmutableCollectionUri) id or uri string to an ImmutableCollectionUri object.
toContextUri
Link copied to clipboard
toEpisodeUri
Link copied to clipboard
toImmutableCollectionUri
Link copied to clipboard
toLocalTrackUri
Link copied to clipboard
toPlayableUri
Link copied to clipboard
toPlaylistUri
Link copied to clipboard
toSpotifyUri
Link copied to clipboard
Convert any (artist, PlayableUri, ImmutableCollectionUri, user, playlist) uri string to a SpotifyUri object.
toTrackUri
Link copied to clipboard