Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
761d87d
feat!: Spotify Web API breaking changes for 2026-02-11 (#448)
Copilot Feb 11, 2026
fbec5b9
chore(track): correct javadoc comment
dargmuesli Feb 11, 2026
786623b
ci: update signing key
dargmuesli Feb 11, 2026
d0dcfaf
10.0.0-RC1
dargmuesli Feb 11, 2026
a93ad50
feat(user): add create playlist endpoint
dargmuesli Mar 9, 2026
e3f71dc
ci(agents): add instructions
dargmuesli Mar 9, 2026
8f77f1d
ci(jitpack): use java 17
dargmuesli Mar 9, 2026
91bf5aa
Merge pull request #454 from spotify-web-api-java/copilot/add-create-…
dargmuesli Mar 9, 2026
a069569
10.0.0-RC2
dargmuesli Mar 9, 2026
557f20d
add common interfaces
fm-sys Apr 13, 2026
fcf3d08
apply copilot review suggestion
fm-sys Apr 13, 2026
01f413e
add getItems to IPlaylist to allow querying number of total tracks
fm-sys Apr 13, 2026
2b41d3e
refactor: sort imports
dargmuesli Apr 29, 2026
57276dd
fix(playlist): allow to extend the has-total interface
dargmuesli Apr 29, 2026
7ef43d2
Merge pull request #457 from fm-sys/common-interfaces
dargmuesli Apr 29, 2026
2841d7a
10.0.0-RC3
dargmuesli Apr 29, 2026
e3c0233
feat(api)!: sync specification (#460)
dargmuesli Aug 31, 2026
559da33
chore(spec): vendor spotify openapi schema for diffing (#469)
dargmuesli Aug 31, 2026
bcca48b
fix(javadoc): qualify cross-package links and document missing members
dargmuesli Aug 31, 2026
2eae502
refactor(playlists): deprecate legacy builders and reorder deprecatio…
dargmuesli Aug 31, 2026
372d951
docs(examples): rename examples to match their request classes
dargmuesli Aug 31, 2026
441e301
docs(examples): add examples for the 26 uncovered endpoints
dargmuesli Aug 31, 2026
33109e9
docs(readme): rebuild the example index from the code
dargmuesli Aug 31, 2026
e0baf0d
ci: verify examples, readme and javadoc on every build
dargmuesli Aug 31, 2026
59fec8b
Merge pull request #470 from spotify-web-api-java/fix/docs/align-java…
dargmuesli Aug 31, 2026
d280088
Merge branch 'main' into beta
dargmuesli Aug 31, 2026
d070e54
10.0.0-RC4
dargmuesli Aug 31, 2026
8dc27f7
docs: add a v9 to v10 migration guide (#471)
dargmuesli Sep 1, 2026
de189af
fix(models)!: deserialize model objects reflectively with gson (#473)
dargmuesli Sep 1, 2026
30ea468
refactor(renovate): add file extension
dargmuesli Sep 1, 2026
ce5f922
docs: correct the 9.4.0 deprecation count in the migration guide
dargmuesli Sep 1, 2026
7f65347
10.0.0-RC5
dargmuesli Sep 1, 2026
b22d303
fix(build): keep the automatic module name in the released jar
dargmuesli Sep 1, 2026
f46781a
10.0.0-RC6
dargmuesli Sep 1, 2026
384e973
feat(build)!: ship an explicit JPMS module and vendor the country cod…
dargmuesli Sep 2, 2026
9bd564a
10.0.0-RC7
dargmuesli Sep 2, 2026
e60028f
refactor(build): compile the examples as their own module (#475)
dargmuesli Sep 2, 2026
fe09274
docs(api): clarify November 2024 restriction notices (#477)
dargmuesli Sep 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add common interfaces
  • Loading branch information
fm-sys committed Apr 13, 2026
commit 557f20d279888dfd8b61cccbc1ffab75e88b3516
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package se.michaelthelin.spotify.model_objects.interfaces;

import se.michaelthelin.spotify.enums.AlbumType;
import se.michaelthelin.spotify.enums.ModelObjectType;
import se.michaelthelin.spotify.enums.ReleaseDatePrecision;
import se.michaelthelin.spotify.model_objects.specification.Album;
import se.michaelthelin.spotify.model_objects.specification.AlbumSimplified;
import se.michaelthelin.spotify.model_objects.specification.ArtistSimplified;
import se.michaelthelin.spotify.model_objects.specification.ExternalUrl;
import se.michaelthelin.spotify.model_objects.specification.Image;
import se.michaelthelin.spotify.model_objects.special.AlbumSimplifiedSpecial;

/**
* Represents the common properties of Spotify Album objects (full and simplified).
*
* <p>This interface provides a common base for {@link Album}, {@link AlbumSimplified},
* and {@link AlbumSimplifiedSpecial} objects.
*/
public interface IAlbum {
/**
* Get the type of the album.
*
* @return The {@link AlbumType}.
*/
AlbumType getAlbumType();

/**
* Get the artists of the album.
*
* @return An array of {@link ArtistSimplified} objects.
*/
ArtistSimplified[] getArtists();

/**
* Get the external URLs of the album. <br>
* Example: <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify-URL</a>
*
* @return An {@link ExternalUrl} object.
*/
ExternalUrl getExternalUrls();

/**
* Get the full Spotify Web API endpoint URL of the album.
*
* @return A Spotify Web API endpoint URL.
*/
String getHref();

/**
* Get the Spotify ID of the album.
*
* @return A <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify album ID</a>.
*/
String getId();

/**
* Get the album cover art of the album in different sizes.
*
* @return An array of {@link Image} objects.
*/
Image[] getImages();

/**
* Get the name of the album.
*
* @return Album name.
*/
String getName();

/**
* Get the release date of the album with the highest precision available.
*
* @return The release date of the album.
*/
String getReleaseDate();

/**
* Get the precision of the albums release date. This is needed when the exact release day of an album is not known.
*
* @return The precision of the albums release date.
*/
ReleaseDatePrecision getReleaseDatePrecision();

/**
* Get the model object type. In this case "album".
*
* @return A {@link ModelObjectType}.
*/
ModelObjectType getType();

/**
* Get the Spotify URI of the album.
*
* @return <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify album URI</a>.
*/
String getUri();
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package se.michaelthelin.spotify.model_objects.interfaces;

import se.michaelthelin.spotify.enums.ModelObjectType;
import se.michaelthelin.spotify.model_objects.specification.Artist;
import se.michaelthelin.spotify.model_objects.specification.ArtistSimplified;
import se.michaelthelin.spotify.model_objects.specification.ExternalUrl;

/**
* Represents the common properties of Spotify Artist objects (full and simplified).
*
* <p>This interface provides a common base for {@link Artist} and
* {@link ArtistSimplified} objects.
*/
public interface IArtist {
/**
* Get the external URLs of the artist. <br>
* Example: <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify-URL</a>
*
* @return An {@link ExternalUrl} object.
*/
ExternalUrl getExternalUrls();

/**
* Get the full Spotify Web API endpoint URL of the artist.
*
* @return A Spotify Web API endpoint URL.
*/
String getHref();

/**
* Get the Spotify ID of the artist.
*
* @return A <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify artist ID</a>.
*/
String getId();

/**
* Get the name of the artist.
*
* @return Artist name.
*/
String getName();

/**
* Get the model object type. In this case "artist".
*
* @return A {@link ModelObjectType}.
*/
ModelObjectType getType();

/**
* Get the Spotify URI of the artist.
*
* @return <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify artist URI</a>.
*/
String getUri();
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package se.michaelthelin.spotify.model_objects.interfaces;

import se.michaelthelin.spotify.enums.ReleaseDatePrecision;
import se.michaelthelin.spotify.model_objects.IPlaylistItem;
import se.michaelthelin.spotify.model_objects.specification.Episode;
import se.michaelthelin.spotify.model_objects.specification.EpisodeSimplified;
import se.michaelthelin.spotify.model_objects.specification.Image;
import se.michaelthelin.spotify.model_objects.specification.ResumePoint;

/**
* Represents the common properties of Spotify Episode objects (full and simplified).
*
* <p>This interface extends {@link IPlaylistItem} and provides a common base for
* {@link Episode} and
* {@link EpisodeSimplified}
* objects.
*/
public interface IEpisode extends IPlaylistItem {
/**
* Get a link to a 30 second preview (MP3 format) of the episode. {@code null} if not available.
*
* @return A link to a 30 second preview (MP3 format) of the episode. {@code null} if not available.
*/
String getAudioPreviewUrl();

/**
* Get a description of the episode.
*
* @return The description of the episode.
*/
String getDescription();

/**
* Check whether the episode is explicit or not.
*
* @return Whether or not the episode has explicit content ({@code true} = yes it does; {@code false} = no it does not
* <b>OR</b> unknown).
*/
Boolean getExplicit();

/**
* Get the cover art for the episode in various sizes, widest first.
*
* @return An array of {@link Image} objects.
*/
Image[] getImages();

/**
* Check whether the episode is hosted outside of Spotify's CDN.
*
* @return True if the episode is hosted outside of Spotify's CDN.
*/
Boolean getExternallyHosted();

/**
* Check whether the episode is playable in the given market.
*
* @return True if the episode is playable in the given market. Otherwise false.
*/
Boolean getPlayable();

/**
* Get a list of the languages used in the episode, identified by their ISO 639 code.
*
* @return An array of <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2 country codes</a>.
*/
String[] getLanguages();

/**
* Get the date the episode was first released, for example "1981-12-15". Depending on the precision, it might be shown as "1981" or "1981-12".
*
* @return The release date of the episode.
*/
String getReleaseDate();

/**
* Get the precision with which the release date is known.
*
* @return A {@link ReleaseDatePrecision} object.
*/
ReleaseDatePrecision getReleaseDatePrecision();

/**
* Get the user's most recent position in the episode. Set if the supplied access token is a user token and has the scope {@code user-read-playback-position}.
*
* @return A {@link ResumePoint} object.
*/
ResumePoint getResumePoint();
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package se.michaelthelin.spotify.model_objects.interfaces;

import se.michaelthelin.spotify.enums.ModelObjectType;
import se.michaelthelin.spotify.model_objects.specification.ExternalUrl;
import se.michaelthelin.spotify.model_objects.specification.Image;
import se.michaelthelin.spotify.model_objects.specification.Playlist;
import se.michaelthelin.spotify.model_objects.specification.PlaylistSimplified;
import se.michaelthelin.spotify.model_objects.specification.User;

/**
* Represents the common properties of Spotify Playlist objects (full and simplified).
*
* <p>This interface provides a common base for {@link Playlist} and
* {@link PlaylistSimplified} objects.
*/
public interface IPlaylist {
/**
* Check whether the owner allows other users to modify the playlist.
*
* @return {@code true} if other users are allowed to modify the playlist, {@code false} otherwise.
* @see <a href="https://developer.spotify.com/documentation/web-api/concepts/playlists">
* Spotify: Working With Playlists</a>
*/
Boolean getIsCollaborative();

/**
* Get the description of the playlist.
*
* @return The playlist description. Only returned for modified, verified playlists, otherwise {@code null}.
*/
String getDescription();

/**
* Get the external URLs of the playlist. <br>
* Example: Spotify-URL.
*
* @return Known external URLs for this playlist.
*/
ExternalUrl getExternalUrls();

/**
* Get the full Spotify API endpoint url of the playlist.
*
* @return A link to the Web API endpoint providing full details of the playlist.
*/
String getHref();

/**
* Get the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify ID</a>
* of a playlist.
*
* @return The Spotify ID for the playlist.
*/
String getId();

/**
* Images for the playlist. The array may be empty or contain up to three images. The images are returned by size in
* descending order. <br>
* <b>Note:</b> If returned, the source URL for the image is temporary and will expire in less than a day.
*
* @return An array of images in different sizes.
* @see <a href="https://developer.spotify.com/documentation/web-api/concepts/playlists">
* Spotify: Working With Playlists</a>
*/
Image[] getImages();

/**
* Get the name of a playlist.
*
* @return Playlist name.
*/
String getName();

/**
* Get the owners user object of a playlist.
*
* @return A user object.
*/
User getOwner();

/**
* Check whether a playlist is available in public or is private.
*
* @return {@code true} the playlist is public, {@code false} the playlist is private, {@code null}
* the playlist status is not relevant.
* @see <a href="https://developer.spotify.com/documentation/web-api/concepts/playlists">
* Spotify: Working With Playlists</a>
*/
Boolean getIsPublicAccess();

/**
* Get the snapshot ID, the version identifier for the current playlist. Can be supplied in other requests to target
* a specific playlist version.
*
* @return The version identifier for the current playlist.
* @see se.michaelthelin.spotify.requests.data.playlists.RemoveItemsFromPlaylistRequest
*/
String getSnapshotId();

/**
* Get the model object type. In this case "playlist".
*
* @return The object type: "playlist"
*/
ModelObjectType getType();

/**
* Get the <a href="https://developer.spotify.com/documentation/web-api/concepts/spotify-uris-ids">Spotify URI</a>
* of a playlist.
*
* @return Spotify playlist URI.
*/
String getUri();
}


Loading
Loading