Package-level declarations

This package contains the response models.

Types

Link copied to clipboard
data class Album(val albumGroup: String, val albumType: String, val artists: List<Artist>, val availableMarkets: List<String>?, val id: String, val images: List<Image>, val name: String, val releaseDate: String, val restrictions: Restrictions?, val totalTracks: Int)
Link copied to clipboard
data class Albums(val items: List<Album>, val isNext: Boolean)
Link copied to clipboard
data class AlbumTrack(val id: String, val name: String, val duration: Long, val artists: List<Artist>, val previewUrl: String?)
Link copied to clipboard
data class AlbumTracks(val isNext: Boolean, val items: List<AlbumTrack>)
Link copied to clipboard
data class Artist(val followers: Long?, val genres: List<String>?, val id: String, val images: List<Image>?, val name: String, val popularity: Int)
Link copied to clipboard
data class Artists(val items: List<Artist>, val isNext: Boolean)
Link copied to clipboard
data class ArtistTopTracks(val tracks: List<Track>)
Link copied to clipboard
data class Categories(val items: List<Category>, val isNext: Boolean)
Link copied to clipboard
data class Category(val name: String, val image: List<Image>, val id: String)
Link copied to clipboard
@Serializable
data class Error(val status: Int, val message: String)
Link copied to clipboard
@Serializable
data class ErrorBody(val error: Error)
Link copied to clipboard
@Serializable
data class Genres(val genres: List<String>)
Link copied to clipboard
data class Image(val height: Int?, val width: Int?, val url: String)
Link copied to clipboard
data class NewAlbumReleases(val isNext: Boolean, val items: List<Album>)
Link copied to clipboard
data class Playlist(val collaborative: Boolean, val description: String, val id: String, val name: String, val images: List<Image>, val public: Boolean)
Link copied to clipboard
data class Playlists(val items: List<Playlist>, val isNext: Boolean)
Link copied to clipboard
data class PlaylistTracks(val tracks: List<Track>, val isNext: Boolean)
Link copied to clipboard
data class Recommendations(val tracks: List<Track>, val seeds: List<Seed>)
Link copied to clipboard
data class RelatedArtists(val artists: List<Artist>)
Link copied to clipboard
data class Restrictions(val reason: String)
Link copied to clipboard
data class Seed(val id: String, val type: String)
Link copied to clipboard
sealed interface SpotifyApiResponse<out RESPONSE, out ERROR>

All APIs return SpotifyApiResponse. If the request is success then you will be receiving SpotifyApiResponse.Success. If there is any error you will be receiving SpotifyApiResponse.Error.

Link copied to clipboard
data class Track(val addedAt: String?, val album: Album, val artists: List<Artist>, val availableMarkets: List<String>?, val restrictions: Restrictions?, val discNumber: Int, val duration: Long, val explicit: Boolean, val id: String, val name: String, val popularity: Int, val previewUrl: String?)
Link copied to clipboard
data class Tracks(val items: List<Track>, val isNext: Boolean)