Repository navigation
ci(release): v10 - #455
Merged
Merged
ci(release): v10#455
Conversation
* Initial plan * Remove 20 request classes, their test classes, and test fixtures Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove deleted request class references and add new library builder methods in SpotifyApi.java Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove deprecated endpoints and add new /me/library endpoints - Remove 20 deprecated request classes (GET several/top, POST/GET user-specific, PUT/DELETE per-type library) - Remove corresponding 20 test classes and 12 test fixtures - Remove 28 builder methods from SpotifyApi.java - Add SaveToLibraryRequest (PUT /me/library) and RemoveFromLibraryRequest (DELETE /me/library) - Add saveToLibrary() and removeFromLibrary() builder methods to SpotifyApi.java Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove availableMarkets, externalIds, label, and popularity fields from Album model Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove albumGroup and availableMarkets fields from AlbumSimplified Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove followers and popularity fields from Artist model class Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove availableMarkets, externalIds, linkedFrom, and popularity fields from Track model Remove field declarations, constructor assignments, getter methods, Builder setter methods, and JsonUtil deserialization code for the four fields. Also remove unused imports (CountryCode, ExternalId, TrackLink, Gson) and update toString method. Update GetTrackRequestTest to remove assertions for removed fields. Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove availableMarkets and linkedFrom fields from TrackSimplified Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove availableMarkets and publisher fields from Show and ShowSimplified Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Remove country, email, followers, and product fields from User model Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Rename tracks/track fields to items/item in Playlist, PlaylistSimplified, and PlaylistTrack Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Fix test compilation errors after model field removals Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Rename playlist JSON fixture fields: tracks→items, track→item Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Add tests for SaveToLibraryRequest and RemoveFromLibraryRequest endpoints Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Update examples directory for API changes and add compile-examples CI step - Remove 20 example files for deleted endpoints - Add SaveToLibraryExample and RemoveFromLibraryExample - Fix pre-existing SavedEpisode import bug in GetUsersSavedEpisodesExample - Add compile-examples Maven profile to compile examples with project sources - Add CI step to compile examples during builds Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * Fix Javadoc for renamed playlist fields and add @OverRide to library request execute methods - PlaylistSimplified.setItems(): update @PARAM tracks → items - Playlist.setItems(): update Javadoc wording and @PARAM tracks → items - PlaylistTrack.setItem(): update Javadoc wording and @PARAM track → item - SaveToLibraryRequest.execute(): add @OverRide annotation - RemoveFromLibraryRequest.execute(): add @OverRide annotation Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> * ci: compile examples by default --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dargmuesli <4778485+dargmuesli@users.noreply.github.com> Co-authored-by: Jonas Thelemann <e-mail@jonas-thelemann.de>
…playlist-endpoint Add CreatePlaylist endpoint (POST /v1/me/playlists)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #455 +/- ##
=============================================
- Coverage 66.62% 46.11% -20.52%
- Complexity 672 683 +11
=============================================
Files 184 209 +25
Lines 7275 6252 -1023
Branches 1153 753 -400
=============================================
- Hits 4847 2883 -1964
- Misses 1524 2812 +1288
+ Partials 904 557 -347 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
feat: add common interfaces
…doc-and-examples fix(javadoc): unbreak the release build and align examples with the code
Member
Author
|
@Selbi182 I'm now feeling quite done with the sync against Spotify's API spec. Would you test the v10-RC migration in your projects? See @WhosNickDoglio I've also replaced the JSON boilerplate (jackson) with GSON (regarding ticket #461, not sure if I'll do a Kotlin / Gradle migration any time soon). If you have any thoughts on that let me know before the release! :) |
dargmuesli
marked this pull request as ready for review
September 2, 2026 08:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v10 release, the first major release since 9.4.0.
Spotify changed its Web API on 2026-02-11 and kept adjusting it afterwards.
This release brings the library back in line with what Spotify actually serves today.
Most of the work here was not a choice: when Spotify stops returning a piece of data, a wrapper cannot invent it.
What changes for people who use this library
Some data is gone.
Spotify no longer returns it, so the library no longer offers it:
Playlists behave differently.
Spotify only returns the contents of playlists that belong to the user making the request.
Every other playlist comes back with its description data (name, images, owner) but without its list of songs.
Following Spotify's own wording, the playlist field that was called
tracksis now calleditems.Saving and removing library items is one operation now.
Instead of a separate call per content type (save a track, save an album, save a show, and so on) there is a single call that accepts any mix of items.
The per-type calls still exist and still work.
Nothing that worked in 9.4.0 became unreachable.
Endpoints that Spotify announced as removed are still shipped, marked deprecated, because credentials issued before the change can still reach them.
Deprecated here does not mean scheduled for deletion, no removal date is planned.
49 of 114 request builders now carry that marker, up from none.
The exception is a handful of old call variants that took a playlist owner id, since Spotify's endpoints no longer accept one.
Three audio analysis values start working.
getWindowSeconds()andgetEndOfFadeIn()on a track's audio analysis, andgetMode()on one of its sections, always came back empty.The library was reading keys that Spotify does not send, two of them misspelled and one guarded on a field that sections do not carry.
Code that checked these for null will now take the other branch.
Two fewer dependencies.
Model objects are read with Gson alone now, so Jackson is no longer pulled in.
This only affects you if you passed these classes to a Jackson
ObjectMapperof your own, which worked off annotations that no longer exist.The
nv-i18ncountry code library is gone too, replaced by an equivalent enum shipped here.Only Gson and HttpComponents are left.
The jar is a Java module.
It carries a real module descriptor instead of just a name in the manifest, so a
requires se.michaelthelin.spotify;now resolves the library's own dependencies too, and ajlinkimage can include it as a proper module.The module name has not changed, so existing module declarations keep working, and nothing about this affects code on the classpath.
New ground is covered.
Audiobooks and chapters are supported for the first time, including searching for them and saving them to a library.
The list of markets where Spotify is available is back.
Creating a playlist works again, it had gone missing during the migration in 10.0.0-RC1.
What upgrading costs
This is not a drop-in upgrade, applications will need code changes.
Many classes and methods were renamed to carry the names Spotify uses in its own documentation, for example
searchItemis nowsearchForItemandgetInformationAboutUsersCurrentPlaybackis nowgetPlaybackState.Request classes were regrouped into packages that mirror Spotify's own grouping.
The complete before/after tables are in #460.
In exchange the library covers more of the API than before: 114 operations, up from 94.
Country codes come from this library now rather than from
nv-i18n, which stopped being maintained in 2021 and could not be required safely from a module.The constant names are unchanged, so that break is one import line per file.
A few types that nothing referenced any more were deleted too:
PlaylistTrackPosition, theProductTypeandAlbumGroupenums, and two paging helpers that threw whenever they were used.The published API documentation moved with the module descriptor: pages now sit under a
se.michaelthelin.spotify/path segment. Links to the old locations are redirected, so existing bookmarks keep working.Also in this release: shared interfaces so that full and simplified variants of the same object can be handled by the same code (#457), a vendored copy of Spotify's API specification so future syncs are a file comparison instead of a manual read-through (#469), and a migration guide with the complete rename tables (#471).
Pull requests in this release
🚀 Features
🐛 Fixes
🔧 Internal