Skip to content

ci(release): v10 - #455

Merged
dargmuesli merged 38 commits into
mainfrom
beta
Sep 7, 2026
Merged

dargmuesli merged 38 commits into
mainfrom
beta

Conversation

@dargmuesli

@dargmuesli dargmuesli commented Mar 9, 2026 •

Copy link
Copy Markdown
Member

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:

  • popularity scores for tracks and albums
  • the list of countries an album, track or show is available in
  • the publisher of a show
  • the "linked from" pointer to the original version of a relinked track

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 tracks is now called items.

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() and getEndOfFadeIn() on a track's audio analysis, and getMode() 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 ObjectMapper of your own, which worked off annotations that no longer exist.
The nv-i18n country 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 a jlink image 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 searchItem is now searchForItem and getInformationAboutUsersCurrentPlayback is now getPlaybackState.
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.

- import com.neovisionaries.i18n.CountryCode;
+ import se.michaelthelin.spotify.enums.CountryCode;

A few types that nothing referenced any more were deleted too: PlaylistTrackPosition, the ProductType and AlbumGroup enums, 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

⚠️ Breaking changes

🚀 Features

🐛 Fixes

🔧 Internal

Copilot AI and others added 8 commits February 11, 2026 16:38
* 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)
Comment thread apidocs/script-files/search-page.js Dismissed
@codecov

codecov Bot commented Mar 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.11%. Comparing base (d88034a) to head (fe09274).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dargmuesli

dargmuesli commented Sep 2, 2026 •

Copy link
Copy Markdown
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 MIGRATION.md on beta.

@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
dargmuesli marked this pull request as ready for review September 2, 2026 08:52
@dargmuesli
dargmuesli merged commit 72cd09c into main Sep 7, 2026
16 checks passed
@dargmuesli
dargmuesli deleted the beta branch September 7, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants