Advanced coroutine-based Spotify API wrapper for Kotlin.
- Rate limits handling.
- Kotify Http Proxy.
- Better documentation.
- Client Credentials Flow (
used to authenticate Kotify
). - Authorization Code Flow (
used by HUGE
). - Token Refresh (
used by HUGE
).
- Get Album.
Used by HUGE
- Get Several Albums.
- Get Album Tracks.
Used by HUGE
- Get Saved Albums.
- Save Albums.
- Remove Albums.
- Check Saved Albums.
- Get New Releases.
- Get Artist.
Used by HUGE
- Get Several Artists.
- Get Artist's Albums.
- Get Artist's Top Tracks.
Used by HUGE
- Get Artist's Related Artists.
- Get Shows.
- Get Several Shows.
- Get Show Episodes.
- Get User's Saved Shows.
- Save Shows for Current User.
- Remove User's Saved Shows.
- Check User's Saved Shows.
- Get Episode.
- Get Several Episodes.
- Get User's Saved Episodes.
- Save Episodes for User.
- Remove User's Saved Episodes.
- Check User's Saved Episodes.
- Get Track.
Used by HUGE
- Get Several Tracks.
- Get User's Saved Tracks.
Used by HUGE
- Save Tracks for Current User.
- Remove Tracks for Current User.
- Check User's Saved Tracks.
- Get Track's Audio Features.
- Get Track's Audio Analysis.
- Get Recommendations.
Used by HUGE
- Search for Item.
- Get Current User's Profile.
- Get User's Top Items.
Used by HUGE
- Get User's Profile
- Follow Playlist.
- Unfollow Playlist.
- Get Followed Artists.
- Follow Artists or Users.
- Unfollow Artists or Users.
- Check If User Follows Artists or Users.
- Check if Users Follow Playlist.
- Get Playlist.
Used by HUGE
- Change Playlist Details.
- Get Playlist Items.
Used by HUGE
- Add Items to Playlist.
- Update Playlist Items.
- Remove Playlist Items.
- Get Current User's Playlists.
Used by HUGE
- Get User's Playlist.
- Create Playlist.
- Get Featured Playlists.
Used by HUGE
- Get Category's Playlists.
- Get Playlist Cover Image.
- Add Custom Playlist Cover Image.
- Get Several Brows Categories.
- Get Single Brows Category.
- Get Available Genre Seeds.
- Get Playback State.
- Transfer Playback.
- Get Available Devices.
- Get Currently Playing Track.
- Start/Resume Playback.
- Pause Playback.
- Skip To Next.
- Skip To Previous.
- Seek To Position.
- Set Repeat Mode.
- Set Playback Volume.
- Toggle Playback Shuffle.
- Get Recently Played Tracks.
- Add Item to Playback Queue.
- Get Available Markets.
This package has the following requirements:
Configure the Kotify instance and execute requests:
suspend fun main() {
val kotify = Kotify(
clientId = "Spotify Client ID",
clientSecret = "Spotify Client Secret"
)
// Fetch "This Is Arcane" playlist.
val playlist: Playlist = kotify.playlists.get("37i9dQZF1DZ06evO30uMeI")
// This will retrieve all the items inside the playlist
// If the playlist have less than 100 tracks this is not required.
val items: List<Item> = kotify.playlists.retrieveAllTracks(playlist)
val tracks: List<Track> = items.map { it.track }
// Fetch "Burn It All Down" track
val track = kotify.tracks.get("0ked784BOZ1JtRVHux98jE")
}
repositories {
mavenCentral()
}
dependencies {
implementation("tv.blademaker:kotify:${VERSION}")
}