Class SpotifyApi
public class SpotifyApi extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpotifyApi.BuilderBuilder class for buildingSpotifyApiinstances. -
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_AUTHENTICATION_HOSTThe default authentication host of Spotify API calls.static intDEFAULT_AUTHENTICATION_PORTThe default authentication port of Spotify API calls.static StringDEFAULT_AUTHENTICATION_SCHEMEThe default authentication http scheme of Spotify API calls.static StringDEFAULT_HOSTThe default host of Spotify API calls.static IHttpManagerDEFAULT_HTTP_MANAGERA HttpManager configured with default settings.static intDEFAULT_PORTThe default port of Spotify API calls.static StringDEFAULT_SCHEMEThe default http scheme of Spotify API calls.static LoggerLOGGER -
Method Summary
Modifier and Type Method Description AddItemToUsersPlaybackQueueRequest.BuilderaddItemToUsersPlaybackQueue(String uri)Add a track or an episode to the end of the user's current playback queue.AddTracksToPlaylistRequest.BuilderaddTracksToPlaylist(String playlist_id, com.google.gson.JsonArray uris)Add tracks to a playlist.AddTracksToPlaylistRequest.BuilderaddTracksToPlaylist(String playlist_id, String[] uris)Add tracks to a playlist.AddTracksToPlaylistRequest.BuilderaddTracksToPlaylist(String user_id, String playlist_id, com.google.gson.JsonArray uris)Deprecated.Playlist IDs are unique for themselves.AddTracksToPlaylistRequest.BuilderaddTracksToPlaylist(String user_id, String playlist_id, String[] uris)Deprecated.Playlist IDs are unique for themselves.AuthorizationCodeRequest.BuilderauthorizationCode(String code)Returns a builder that can be used to build requests for authorization code grants.AuthorizationCodeRequest.BuilderauthorizationCode(String client_id, String client_secret, String code, URI redirect_uri)Returns a builder that can be used to build requests for authorization code grants.AuthorizationCodeRefreshRequest.BuilderauthorizationCodeRefresh()Refresh the access token by using authorization code grant.AuthorizationCodeRefreshRequest.BuilderauthorizationCodeRefresh(String client_id, String client_secret, String refresh_token)Refresh the access token by using authorization code grant.AuthorizationCodeUriRequest.BuilderauthorizationCodeUri()Retrieve an URL where the user can give the application permissions.AuthorizationCodeUriRequest.BuilderauthorizationCodeUri(String client_id, URI redirect_uri)Retrieve an URL where the user can give the application permissions.static SpotifyApi.Builderbuilder()Create a builder for building a new Spotify API instance.ChangePlaylistsDetailsRequest.BuilderchangePlaylistsDetails(String playlist_id)Update a playlists properties.ChangePlaylistsDetailsRequest.BuilderchangePlaylistsDetails(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves.CheckCurrentUserFollowsArtistsOrUsersRequest.BuildercheckCurrentUserFollowsArtistsOrUsers(ModelObjectType type, String[] ids)Check to see if the current user is following one or more artists or other Spotify users.CheckUsersFollowPlaylistRequest.BuildercheckUsersFollowPlaylist(String owner_id, String playlist_id, String[] ids)Check to see if one or more Spotify users are following a specified playlist.CheckUsersSavedAlbumsRequest.BuildercheckUsersSavedAlbums(String... ids)Check if an album is saved in the user's "Your Music" library.CheckUsersSavedTracksRequest.BuildercheckUsersSavedTracks(String... ids)Check if a track is saved in the user's "Your Music" library.ClientCredentialsRequest.BuilderclientCredentials()Returns a builder that can be used to build requests for client credential grants.static Stringconcat(String[] parts, char character)String concatenation helper method.CreatePlaylistRequest.BuildercreatePlaylist(String user_id, String name)Create a playlist.FollowArtistsOrUsersRequest.BuilderfollowArtistsOrUsers(ModelObjectType type, com.google.gson.JsonArray ids)Add the current user as a follower of one or more artists or other Spotify users.FollowArtistsOrUsersRequest.BuilderfollowArtistsOrUsers(ModelObjectType type, String[] ids)Add the current user as a follower of one or more artists or other Spotify users.FollowPlaylistRequest.BuilderfollowPlaylist(String playlist_id, boolean public_)Add the current user as a follower of a playlist.FollowPlaylistRequest.BuilderfollowPlaylist(String owner_id, String playlist_id, boolean public_)Add the current user as a follower of a playlist.static StringformatDefaultDate(Date date)Formats a date, using the default spotify format.StringgetAccessToken()Get the access token specified in the API object, which is used for API calls.GetAlbumRequest.BuildergetAlbum(String id)Returns an album with the ID given below.GetAlbumsTracksRequest.BuildergetAlbumsTracks(String id)Returns the tracks of the album with the ID given below.GetArtistRequest.BuildergetArtist(String id)Get an artist.GetArtistsAlbumsRequest.BuildergetArtistsAlbums(String id)Get the albums of a specific artist.GetArtistsRelatedArtistsRequest.BuildergetArtistsRelatedArtists(String id)Get artists related/similar to an artist.GetArtistsTopTracksRequest.BuildergetArtistsTopTracks(String id, com.neovisionaries.i18n.CountryCode country)Get the top tracks of an artist in a specific country.GetAudioAnalysisForTrackRequest.BuildergetAudioAnalysisForTrack(String id)Get a detailed audio analysis for a single track identified by its unique Spotify ID.GetAudioFeaturesForSeveralTracksRequest.BuildergetAudioFeaturesForSeveralTracks(String... ids)Get audio features for multiple tracks based on their Spotify IDs.GetAudioFeaturesForTrackRequest.BuildergetAudioFeaturesForTrack(String id)Get audio features for a track based on its Spotify ID.GetAvailableGenreSeedsRequest.BuildergetAvailableGenreSeeds()Retrieve a list of available genres seed parameter values for recommendations.GetCategoryRequest.BuildergetCategory(String category_id)Get a category.GetCategorysPlaylistsRequest.BuildergetCategorysPlaylists(String category_id)Get the playlists from a specific category.StringgetClientId()Get the application client ID specified in this API object.StringgetClientSecret()Get the application client secret specified in this API object.GetCurrentUsersProfileRequest.BuildergetCurrentUsersProfile()Get detailed profile information about the current user (including the current user’s username).GetCurrentUsersRecentlyPlayedTracksRequest.BuildergetCurrentUsersRecentlyPlayedTracks()Get tracks from the current user's recently played tracks.GetCurrentUsersSavedAlbumsRequest.BuildergetCurrentUsersSavedAlbums()Get a list of the albums saved in the current Spotify user’s "Your Music" library.StringgetHost()Get the API host used for API calls.IHttpManagergetHttpManager()Get theIHttpManagerused for API calls.GetInformationAboutUsersCurrentPlaybackRequest.BuildergetInformationAboutUsersCurrentPlayback()Get information about the user's current playback state, including track, track progress, and active device.GetListOfCategoriesRequest.BuildergetListOfCategories()Get a list of categories.GetListOfCurrentUsersPlaylistsRequest.BuildergetListOfCurrentUsersPlaylists()Get a list of the playlists owned or followed by the current Spotify user.GetListOfFeaturedPlaylistsRequest.BuildergetListOfFeaturedPlaylists()Get "Featured Playlists" of different countries which may match a specific language.GetListOfNewReleasesRequest.BuildergetListOfNewReleases()Get the newest releases from a specific country.GetListOfUsersPlaylistsRequest.BuildergetListOfUsersPlaylists(String user_id)Get an user's playlists.GetPlaylistRequest.BuildergetPlaylist(String playlist_id)Get a playlist.GetPlaylistRequest.BuildergetPlaylist(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves.GetPlaylistCoverImageRequest.BuildergetPlaylistCoverImage(String playlist_id)Get the image used to represent a specific playlist.GetPlaylistCoverImageRequest.BuildergetPlaylistCoverImage(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves.GetPlaylistsTracksRequest.BuildergetPlaylistsTracks(String playlist_id)Get a playlists tracks.GetPlaylistsTracksRequest.BuildergetPlaylistsTracks(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves.IntegergetPort()Get the port used for API calls.IntegergetProxyPassword()Get the proxy password used for API calls.IntegergetProxyPort()Get the proxy port used for API calls.StringgetProxyUrl()Get the proxy URL used for API calls.IntegergetProxyUsername()Get the proxy username used for API calls.GetRecommendationsRequest.BuildergetRecommendations()Create a playlist-style listening experience based on seed artists, tracks and genres.URIgetRedirectURI()Get the redirect URI of the application specified in this API object.StringgetRefreshToken()Get the refresh token specified in the API object.StringgetScheme()Get the scheme used for API calls.GetSeveralAlbumsRequest.BuildergetSeveralAlbums(String... ids)Get multiple albums.GetSeveralArtistsRequest.BuildergetSeveralArtists(String... ids)Get multiple artists.GetSeveralTracksRequest.BuildergetSeveralTracks(String... ids)Get multiple tracks.GetTrackRequest.BuildergetTrack(String id)Get a track.GetUsersAvailableDevicesRequest.BuildergetUsersAvailableDevices()Get information about an user's available devices.GetUsersCurrentlyPlayingTrackRequest.BuildergetUsersCurrentlyPlayingTrack()Get the object currently being played on the user's Spotify account.GetUsersFollowedArtistsRequest.BuildergetUsersFollowedArtists(ModelObjectType type)Get the current user’s followed artists.GetUsersProfileRequest.BuildergetUsersProfile(String user_id)Get public profile information about a Spotify user.GetUsersSavedTracksRequest.BuildergetUsersSavedTracks()Get an user's "Your Music" tracks.GetUsersTopArtistsRequest.BuildergetUsersTopArtists()Get the current user's top artists based on calculated affinity.<T extends IArtistTrackModelObject>
GetUsersTopArtistsAndTracksRequest.Builder<T>getUsersTopArtistsAndTracks(ModelObjectType type)Get the current user's top artists or tracks based on calculated affinity.GetUsersTopTracksRequest.BuildergetUsersTopTracks()Get the current user's top tracks based on calculated affinity.static SimpleDateFormatmakeSimpleDateFormat(String pattern, String id)static DateparseDefaultDate(String date)Parses a date in the default spotify format.PauseUsersPlaybackRequest.BuilderpauseUsersPlayback()Pause playback on the user's account.RemoveAlbumsForCurrentUserRequest.BuilderremoveAlbumsForCurrentUser(String... ids)Remove one or more albums from the current user's "Your Music" library.RemoveTracksFromPlaylistRequest.BuilderremoveTracksFromPlaylist(String playlist_id, com.google.gson.JsonArray tracks)Delete tracks from a playlistRemoveTracksFromPlaylistRequest.BuilderremoveTracksFromPlaylist(String user_id, String playlist_id, com.google.gson.JsonArray tracks)Deprecated.Playlist IDs are unique for themselves.RemoveUsersSavedTracksRequest.BuilderremoveUsersSavedTracks(String... ids)Remove a track if saved to the user's "Your Music" library.ReorderPlaylistsTracksRequest.BuilderreorderPlaylistsTracks(String playlist_id, int range_start, int insert_before)Reorder a track or a group of tracks in a playlist.ReorderPlaylistsTracksRequest.BuilderreorderPlaylistsTracks(String user_id, String playlist_id, int range_start, int insert_before)Deprecated.Playlist IDs are unique for themselves.ReplacePlaylistsTracksRequest.BuilderreplacePlaylistsTracks(String playlist_id, com.google.gson.JsonArray uris)Replace tracks in a playlist.ReplacePlaylistsTracksRequest.BuilderreplacePlaylistsTracks(String playlist_id, String[] uris)Replace tracks in a playlist.ReplacePlaylistsTracksRequest.BuilderreplacePlaylistsTracks(String user_id, String playlist_id, com.google.gson.JsonArray uris)Deprecated.Playlist IDs are unique for themselves.ReplacePlaylistsTracksRequest.BuilderreplacePlaylistsTracks(String user_id, String playlist_id, String[] uris)Deprecated.Playlist IDs are unique for themselves.SaveAlbumsForCurrentUserRequest.BuildersaveAlbumsForCurrentUser(com.google.gson.JsonArray ids)Save albums in the user's "Your Music" library.SaveAlbumsForCurrentUserRequest.BuildersaveAlbumsForCurrentUser(String... ids)Save albums in the user's "Your Music" library.SaveTracksForUserRequest.BuildersaveTracksForUser(com.google.gson.JsonArray ids)Save tracks in the user's "Your Music" library.SaveTracksForUserRequest.BuildersaveTracksForUser(String... ids)Save tracks in the user's "Your Music" library.SearchAlbumsRequest.BuildersearchAlbums(String q)Get Spotify catalog information about albums that match a keyword string.SearchAlbumsSpecialRequest.BuildersearchAlbumsSpecial(String q)Get Spotify catalog information about albums that match a keyword string.SearchArtistsRequest.BuildersearchArtists(String q)Get Spotify catalog information about artists that match a keyword string.SearchItemRequest.BuildersearchItem(String q, String type)Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.SearchPlaylistsRequest.BuildersearchPlaylists(String q)Get Spotify catalog information about playlists that match a keyword string.SearchTracksRequest.BuildersearchTracks(String q)Get Spotify catalog information about tracks that match a keyword string.SeekToPositionInCurrentlyPlayingTrackRequest.BuilderseekToPositionInCurrentlyPlayingTrack(int position_ms)Seeks to the given position in the user's currently playing track.voidsetAccessToken(String accessToken)Set the access token of the API object.voidsetRefreshToken(String refreshToken)Set the refresh token of the API object.SetRepeatModeOnUsersPlaybackRequest.BuildersetRepeatModeOnUsersPlayback(String state)Set the repeat mode for the user's playback.SetVolumeForUsersPlaybackRequest.BuildersetVolumeForUsersPlayback(int volume_percent)Set the volume for the user's current playback device.SkipUsersPlaybackToNextTrackRequest.BuilderskipUsersPlaybackToNextTrack()Skips to next track in the user's queue.SkipUsersPlaybackToPreviousTrackRequest.BuilderskipUsersPlaybackToPreviousTrack()Skips to previous track in the user's queue.StartResumeUsersPlaybackRequest.BuilderstartResumeUsersPlayback()Start a new context or resume current playback on the user's active device.ToggleShuffleForUsersPlaybackRequest.BuildertoggleShuffleForUsersPlayback(boolean state)Toggle shuffle on or off for user's playback.TransferUsersPlaybackRequest.BuildertransferUsersPlayback(com.google.gson.JsonArray device_ids)Transfer playback to a new device and determine if it should start playing.UnfollowArtistsOrUsersRequest.BuilderunfollowArtistsOrUsers(ModelObjectType type, String[] ids)Remove the current user as a follower of one or more artists or other Spotify users.UnfollowPlaylistRequest.BuilderunfollowPlaylist(String playlist_id)Remove the current user as a follower of a playlist.UnfollowPlaylistRequest.BuilderunfollowPlaylist(String owner_id, String playlist_id)Remove the specified user as a follower of a playlist.UploadCustomPlaylistCoverImageRequest.BuilderuploadCustomPlaylistCoverImage(String playlist_id)Replace the image used to represent a specific playlist.UploadCustomPlaylistCoverImageRequest.BuilderuploadCustomPlaylistCoverImage(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves.
-
Field Details
-
DEFAULT_AUTHENTICATION_HOST
The default authentication host of Spotify API calls.- See Also:
- Constant Field Values
-
DEFAULT_AUTHENTICATION_PORT
public static final int DEFAULT_AUTHENTICATION_PORTThe default authentication port of Spotify API calls.- See Also:
- Constant Field Values
-
DEFAULT_AUTHENTICATION_SCHEME
The default authentication http scheme of Spotify API calls.- See Also:
- Constant Field Values
-
DEFAULT_HOST
The default host of Spotify API calls.- See Also:
- Constant Field Values
-
DEFAULT_HTTP_MANAGER
A HttpManager configured with default settings. -
DEFAULT_PORT
public static final int DEFAULT_PORTThe default port of Spotify API calls.- See Also:
- Constant Field Values
-
DEFAULT_SCHEME
The default http scheme of Spotify API calls.- See Also:
- Constant Field Values
-
LOGGER
-
-
Method Details
-
builder
Create a builder for building a new Spotify API instance.- Returns:
- A
SpotifyApi.Builder.
-
concat
String concatenation helper method.- Parameters:
parts- String parts.character- Separation character.- Returns:
- A string.
-
parseDefaultDate
Parses a date in the default spotify format.- Parameters:
date- the input date to parse- Returns:
- the pared
Date - Throws:
ParseException- if the date is not in a valid format
-
formatDefaultDate
Formats a date, using the default spotify format.- Parameters:
date- the date to format- Returns:
- the formatted date
-
makeSimpleDateFormat
-
getHttpManager
Get theIHttpManagerused for API calls.- Returns:
- An
IHttpManager.
-
getScheme
Get the scheme used for API calls. Default:https- Returns:
- A scheme.
-
getHost
Get the API host used for API calls. Default:"api.spotify.com"- Returns:
- The host address.
-
getPort
Get the port used for API calls. Default:443- Returns:
- A port.
-
getProxyUrl
Get the proxy URL used for API calls.- Returns:
- The proxy URL.
-
getProxyPort
Get the proxy port used for API calls.- Returns:
- The proxy port.
-
getProxyUsername
Get the proxy username used for API calls.- Returns:
- The proxy username.
-
getProxyPassword
Get the proxy password used for API calls.- Returns:
- The proxy password.
-
getClientId
Get the application client ID specified in this API object.- Returns:
- Application client ID.
-
getClientSecret
Get the application client secret specified in this API object.- Returns:
- Application client secret.
-
getRedirectURI
Get the redirect URI of the application specified in this API object.- Returns:
- Application redirect URI.
-
getAccessToken
Get the access token specified in the API object, which is used for API calls.- Returns:
- A Spotify Web API access token.
-
setAccessToken
Set the access token of the API object.- Parameters:
accessToken- A Spotify Web API access token.
-
getRefreshToken
Get the refresh token specified in the API object.- Returns:
- A Spotify Web API refresh token.
-
setRefreshToken
Set the refresh token of the API object.- Parameters:
refreshToken- A Spotify Web API refresh token.
-
authorizationCodeRefresh
public AuthorizationCodeRefreshRequest.Builder authorizationCodeRefresh(String client_id, String client_secret, String refresh_token)Refresh the access token by using authorization code grant.
Requires client ID, client secret, and refresh token to be set.- Parameters:
client_id- When you register your application, Spotify provides you a Client ID.client_secret- When you register your application, Spotify provides you a Client Secret.refresh_token- The refresh token returned from the authorization code exchange.- Returns:
- An
AuthorizationCodeRequest.Builder.
-
authorizationCodeRefresh
Refresh the access token by using authorization code grant.- Returns:
- An
AuthorizationCodeRequest.Builder.
-
authorizationCode
public AuthorizationCodeRequest.Builder authorizationCode(String client_id, String client_secret, String code, URI redirect_uri)Returns a builder that can be used to build requests for authorization code grants.
Requires client ID, client secret, and redirect URI to be set.- Parameters:
client_id- When you register your application, Spotify provides you a Client ID.client_secret- When you register your application, Spotify provides you a Client Secret.code- The authorization code returned from the initial request to the Account /authorize endpoint.redirect_uri- This parameter is used for validation only (there is no actual redirection). The value of this parameter must exactly match the value of redirect_uri supplied when requesting the authorization code.- Returns:
- An
AuthorizationCodeRequest.Builder.
-
authorizationCode
Returns a builder that can be used to build requests for authorization code grants.
Requires authorization code to be set.- Parameters:
code- The authorization code returned from the initial request to the Account /authorize endpoint.- Returns:
- An
AuthorizationCodeRequest.Builder.
-
authorizationCodeUri
public AuthorizationCodeUriRequest.Builder authorizationCodeUri(String client_id, URI redirect_uri)Retrieve an URL where the user can give the application permissions.- Parameters:
client_id- When you register your application, Spotify provides you a Client ID.redirect_uri- This parameter is used for validation only (there is no actual redirection). The value of this parameter must exactly match the value of redirect_uri supplied when requesting the authorization code.- Returns:
- An
AuthorizationCodeUriRequest.Builder.
-
authorizationCodeUri
Retrieve an URL where the user can give the application permissions.- Returns:
- An
AuthorizationCodeUriRequest.Builder.
-
clientCredentials
Returns a builder that can be used to build requests for client credential grants.
Requires client ID and client secret to be set.- Returns:
- A
ClientCredentialsRequest.Builder.
-
getAlbum
Returns an album with the ID given below.- Parameters:
id- The Spotify album ID of the album you're trying to retrieve.- Returns:
- A
GetAlbumRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getAlbumsTracks
Returns the tracks of the album with the ID given below.- Parameters:
id- The Spotify ID of the album you're trying to retrieve.- Returns:
- A
GetAlbumsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getSeveralAlbums
Get multiple albums.- Parameters:
ids- The Spotify IDs of all albums you're trying to retrieve. Maximum: 20 IDs.- Returns:
- A
GetSeveralAlbumsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getArtist
Get an artist.- Parameters:
id- The Spotify ID of the artist.- Returns:
- A
GetArtistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getArtistsAlbums
Get the albums of a specific artist.- Parameters:
id- The Spotify ID of the artist.- Returns:
- A
GetArtistsAlbumsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getArtistsTopTracks
public GetArtistsTopTracksRequest.Builder getArtistsTopTracks(String id, com.neovisionaries.i18n.CountryCode country)Get the top tracks of an artist in a specific country.- Parameters:
id- The Spotify ID of the artist.country- The ISO 3166-1 alpha-2 country code of the specific country.- Returns:
- A
GetArtistsTopTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs, Wikipedia: ISO 3166-1 alpha-2 country codes
-
getArtistsRelatedArtists
Get artists related/similar to an artist.- Parameters:
id- The Spotify ID of the artist.- Returns:
- A
GetArtistsRelatedArtistsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getSeveralArtists
Get multiple artists.- Parameters:
ids- The Spotify IDs of all artists you're trying to retrieve. Maximum: 50 IDs.- Returns:
- A
GetSeveralArtistsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getCategory
Get a category.- Parameters:
category_id- The Spotify category ID for the category.- Returns:
- A
GetCategoryRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getCategorysPlaylists
Get the playlists from a specific category.- Parameters:
category_id- The Spotify category ID for the category.- Returns:
- A
GetCategorysPlaylistsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getListOfCategories
Get a list of categories.- Returns:
- A
GetListOfCategoriesRequest.Builder.
-
getListOfFeaturedPlaylists
Get "Featured Playlists" of different countries which may match a specific language.- Returns:
- A
GetListOfFeaturedPlaylistsRequest.Builder.
-
getListOfNewReleases
Get the newest releases from a specific country.- Returns:
- A
GetListOfNewReleasesRequest.Builder.
-
getRecommendations
Create a playlist-style listening experience based on seed artists, tracks and genres.- Returns:
- A
GetRecommendationsRequest.Builder.
-
getAvailableGenreSeeds
Retrieve a list of available genres seed parameter values for recommendations.- Returns:
- A
GetAvailableGenreSeedsRequest.Builder.
-
checkCurrentUserFollowsArtistsOrUsers
public CheckCurrentUserFollowsArtistsOrUsersRequest.Builder checkCurrentUserFollowsArtistsOrUsers(ModelObjectType type, String[] ids)Check to see if the current user is following one or more artists or other Spotify users.- Parameters:
type- The ID type: either artist or user.ids- A list of the artist or the user Spotify IDs to check. Maximum: 50 IDs.- Returns:
- A
CheckCurrentUserFollowsArtistsOrUsersRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
checkUsersFollowPlaylist
public CheckUsersFollowPlaylistRequest.Builder checkUsersFollowPlaylist(String owner_id, String playlist_id, String[] ids)Check to see if one or more Spotify users are following a specified playlist.- Parameters:
owner_id- The Spotify User ID of the person who owns the playlist.playlist_id- The Spotify ID of the playlist.ids- A list of Spotify User IDs; the IDs of the users that you want to check to see if they follow the playlist. Maximum: 5 IDs.- Returns:
- A
CheckUsersFollowPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
followArtistsOrUsers
public FollowArtistsOrUsersRequest.Builder followArtistsOrUsers(ModelObjectType type, String[] ids)Add the current user as a follower of one or more artists or other Spotify users.- Parameters:
type- The ID type: either artist or user.ids- A list of the artist or the user Spotify IDs. Maximum: 50 IDs.- Returns:
- A
FollowArtistsOrUsersRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
followArtistsOrUsers
public FollowArtistsOrUsersRequest.Builder followArtistsOrUsers(ModelObjectType type, com.google.gson.JsonArray ids)Add the current user as a follower of one or more artists or other Spotify users.- Parameters:
type- The ID type: either artist or user.ids- A list of the artist or the user Spotify IDs. Maximum: 50 IDs.- Returns:
- A
FollowArtistsOrUsersRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
followPlaylist
public FollowPlaylistRequest.Builder followPlaylist(String owner_id, String playlist_id, boolean public_)Add the current user as a follower of a playlist.- Parameters:
owner_id- The Spotify user ID of the person who owns the playlist.playlist_id- The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.public_- Default: true. If true the playlist will be included in user's public playlists, if false it will remain private. To be able to follow playlists privately, the user must have granted the playlist-modify-private scope.- Returns:
- A
FollowPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
followPlaylist
Add the current user as a follower of a playlist.- Parameters:
playlist_id- The Spotify ID of the playlist. Any playlist can be followed, regardless of its public/private status, as long as you know its playlist ID.public_- Default: true. If true the playlist will be included in user's public playlists, if false it will remain private. To be able to follow playlists privately, the user must have granted the playlist-modify-private scope.- Returns:
- A
FollowPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getUsersFollowedArtists
Get the current user’s followed artists.- Parameters:
type- The ID type: currently only artist is supported.- Returns:
- A
GetUsersFollowedArtistsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
unfollowArtistsOrUsers
public UnfollowArtistsOrUsersRequest.Builder unfollowArtistsOrUsers(ModelObjectType type, String[] ids)Remove the current user as a follower of one or more artists or other Spotify users.- Parameters:
type- The ID type: either artist or user.ids- A list of the artist or the user Spotify IDs. Maximum: 50 IDs.- Returns:
- A
UnfollowArtistsOrUsersRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
unfollowPlaylist
Remove the specified user as a follower of a playlist.- Parameters:
owner_id- The owners username.playlist_id- The playlist's ID.- Returns:
- An
UnfollowPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
unfollowPlaylist
Remove the current user as a follower of a playlist.- Parameters:
playlist_id- The playlist's ID.- Returns:
- An
UnfollowPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
checkUsersSavedAlbums
Check if an album is saved in the user's "Your Music" library.- Parameters:
ids- The album IDs to check for in the user's Your Music library. Maximum: 50 IDs.- Returns:
- A
CheckUsersSavedAlbumsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
checkUsersSavedTracks
Check if a track is saved in the user's "Your Music" library.- Parameters:
ids- The track IDs to check for in the user's Your Music library. Maximum: 50 IDs.- Returns:
- A
CheckUsersSavedTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getCurrentUsersSavedAlbums
Get a list of the albums saved in the current Spotify user’s "Your Music" library.- Returns:
- A
GetCurrentUsersSavedAlbumsRequest.Builder.
-
getUsersSavedTracks
Get an user's "Your Music" tracks.- Returns:
- A
GetUsersSavedTracksRequest.Builder.
-
removeAlbumsForCurrentUser
Remove one or more albums from the current user's "Your Music" library.- Parameters:
ids- A list of the Spotify IDs. Maximum: 50 IDs.- Returns:
- A
RemoveAlbumsForCurrentUserRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
removeUsersSavedTracks
Remove a track if saved to the user's "Your Music" library.- Parameters:
ids- The track IDs to remove from the user's Your Music library. Maximum: 50 IDs.- Returns:
- A
RemoveUsersSavedTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
saveAlbumsForCurrentUser
Save albums in the user's "Your Music" library.- Parameters:
ids- The album IDs to add to the user's library. Maximum: 50 IDs.- Returns:
- A
SaveAlbumsForCurrentUserRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
saveAlbumsForCurrentUser
public SaveAlbumsForCurrentUserRequest.Builder saveAlbumsForCurrentUser(com.google.gson.JsonArray ids)Save albums in the user's "Your Music" library.- Parameters:
ids- The album IDs to add to the user's library. Maximum: 50 IDs.- Returns:
- A
SaveAlbumsForCurrentUserRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
saveTracksForUser
Save tracks in the user's "Your Music" library.- Parameters:
ids- The track IDs to add to the user's library. Maximum: 50 IDs.- Returns:
- A
SaveTracksForUserRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
saveTracksForUser
Save tracks in the user's "Your Music" library.- Parameters:
ids- The track IDs to add to the user's library. Maximum: 50 IDs.- Returns:
- A
SaveTracksForUserRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getUsersTopArtistsAndTracks
public <T extends IArtistTrackModelObject> GetUsersTopArtistsAndTracksRequest.Builder<T> getUsersTopArtistsAndTracks(ModelObjectType type)Get the current user's top artists or tracks based on calculated affinity.
Affinity is a measure of the expected preference an user has for a particular track or artist. It is based on user behavior, including play history, but does not include actions made while in incognito mode. Light or infrequent users of Spotify may not have sufficient play history to generate a full affinity data set.
- Type Parameters:
T- EitherArtistorTrack- Parameters:
type- The type of entity to return. Valid values: artists or tracks.- Returns:
- A
GetUsersTopArtistsAndTracksRequest.Builder.
-
getUsersTopArtists
Get the current user's top artists based on calculated affinity.- Returns:
- A
GetUsersTopArtistsRequest.Builder. - See Also:
getUsersTopArtistsAndTracks(ModelObjectType)
-
getUsersTopTracks
Get the current user's top tracks based on calculated affinity.- Returns:
- A
GetUsersTopTracksRequest.Builder. - See Also:
getUsersTopArtistsAndTracks(ModelObjectType)
-
getInformationAboutUsersCurrentPlayback
public GetInformationAboutUsersCurrentPlaybackRequest.Builder getInformationAboutUsersCurrentPlayback()Get information about the user's current playback state, including track, track progress, and active device. -
getCurrentUsersRecentlyPlayedTracks
Get tracks from the current user's recently played tracks.
Returns the most recent 50 tracks played by an user. Note that a track currently playing will not be visible in play history until it has completed. A track must be played for more than 30 seconds to be included in play history.
Any tracks listened to while the user had "Private Session" enabled in their client will not be returned in the list of recently played tracks.
-
getUsersAvailableDevices
Get information about an user's available devices.- Returns:
- A
GetUsersAvailableDevicesRequest.Builder.
-
getUsersCurrentlyPlayingTrack
Get the object currently being played on the user's Spotify account.- Returns:
- A
GetUsersCurrentlyPlayingTrackRequest.Builder.
-
pauseUsersPlayback
Pause playback on the user's account.- Returns:
- A
PauseUsersPlaybackRequest.Builder.
-
seekToPositionInCurrentlyPlayingTrack
public SeekToPositionInCurrentlyPlayingTrackRequest.Builder seekToPositionInCurrentlyPlayingTrack(int position_ms)Seeks to the given position in the user's currently playing track.- Parameters:
position_ms- The position in milliseconds to seek to. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.- Returns:
- A
SeekToPositionInCurrentlyPlayingTrackRequest.Builder.
-
setRepeatModeOnUsersPlayback
Set the repeat mode for the user's playback. Options are repeat-track, repeat-context, and off.- Parameters:
state- track, context or off. track will repeat the current track. context will repeat the current context. off will turn repeat off.- Returns:
- A
SetRepeatModeOnUsersPlaybackRequest.Builder.
-
setVolumeForUsersPlayback
Set the volume for the user's current playback device.- Parameters:
volume_percent- Integer. The volume to set. Must be a value from 0 to 100 inclusive.- Returns:
- A
SetVolumeForUsersPlaybackRequest.Builder.
-
skipUsersPlaybackToNextTrack
Skips to next track in the user's queue.- Returns:
- A
SkipUsersPlaybackToNextTrackRequest.Builder.
-
skipUsersPlaybackToPreviousTrack
Skips to previous track in the user's queue.Note: This will ALWAYS skip to the previous track, regardless of the current track’s progress. Returning to the start of the current track should be performed using the
seekToPositionInCurrentlyPlayingTrack(int)method.- Returns:
- A
SkipUsersPlaybackToPreviousTrackRequest.Builder.
-
startResumeUsersPlayback
Start a new context or resume current playback on the user's active device.- Returns:
- A
StartResumeUsersPlaybackRequest.Builder.
-
toggleShuffleForUsersPlayback
Toggle shuffle on or off for user's playback.- Parameters:
state- true: Shuffle user's playback. false: Do not shuffle user's playback.- Returns:
- A
ToggleShuffleForUsersPlaybackRequest.Builder.
-
transferUsersPlayback
public TransferUsersPlaybackRequest.Builder transferUsersPlayback(com.google.gson.JsonArray device_ids)Transfer playback to a new device and determine if it should start playing.- Parameters:
device_ids- A JSON array containing the ID of the device on which playback should be started/transferred.
Note: Although an array is accepted, only a single device_id is currently supported.- Returns:
- A
TransferUsersPlaybackRequest.Builder.
-
addItemToUsersPlaybackQueue
Add a track or an episode to the end of the user's current playback queue.- Parameters:
uri- The uri of the item to add to the queue. Must be a track or an episode uri.- Returns:
- A
AddItemToUsersPlaybackQueueRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
addTracksToPlaylist
@Deprecated public AddTracksToPlaylistRequest.Builder addTracksToPlaylist(String user_id, String playlist_id, String[] uris)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Add tracks to a playlist.- Parameters:
user_id- The owners username.playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- An
AddTracksToPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
addTracksToPlaylist
Add tracks to a playlist.- Parameters:
playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- An
AddTracksToPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
addTracksToPlaylist
@Deprecated public AddTracksToPlaylistRequest.Builder addTracksToPlaylist(String user_id, String playlist_id, com.google.gson.JsonArray uris)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Add tracks to a playlist.- Parameters:
user_id- The owners username.playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- An
AddTracksToPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
addTracksToPlaylist
public AddTracksToPlaylistRequest.Builder addTracksToPlaylist(String playlist_id, com.google.gson.JsonArray uris)Add tracks to a playlist.- Parameters:
playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- An
AddTracksToPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
changePlaylistsDetails
@Deprecated public ChangePlaylistsDetailsRequest.Builder changePlaylistsDetails(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Update a playlists properties.- Parameters:
user_id- The owners username.playlist_id- The playlists ID.- Returns:
- A
ChangePlaylistsDetailsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
changePlaylistsDetails
Update a playlists properties.- Parameters:
playlist_id- The playlists ID.- Returns:
- A
ChangePlaylistsDetailsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
createPlaylist
Create a playlist.- Parameters:
user_id- The playlists owner.name- The name of the playlist.- Returns:
- A
CreatePlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getListOfCurrentUsersPlaylists
Get a list of the playlists owned or followed by the current Spotify user.- Returns:
- A
GetListOfCurrentUsersPlaylistsRequest.Builder.
-
getListOfUsersPlaylists
Get an user's playlists.- Parameters:
user_id- A Spotify ID of the user.- Returns:
- A
GetListOfUsersPlaylistsRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getPlaylist
Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Get a playlist.- Parameters:
user_id- The playlists owners username.playlist_id- The playlists ID.- Returns:
- A
GetPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getPlaylist
Get a playlist.- Parameters:
playlist_id- The playlists ID.- Returns:
- A
GetPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getPlaylistCoverImage
@Deprecated public GetPlaylistCoverImageRequest.Builder getPlaylistCoverImage(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Get the image used to represent a specific playlist.- Parameters:
user_id- The user's Spotify user ID.playlist_id- The Spotify ID for the playlist.- Returns:
- A
GetPlaylistCoverImageRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getPlaylistCoverImage
Get the image used to represent a specific playlist.- Parameters:
playlist_id- The Spotify ID for the playlist.- Returns:
- A
GetPlaylistCoverImageRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getPlaylistsTracks
@Deprecated public GetPlaylistsTracksRequest.Builder getPlaylistsTracks(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Get a playlists tracks.- Parameters:
user_id- The playlists owners username.playlist_id- The playlists ID.- Returns:
- A
GetPlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getPlaylistsTracks
Get a playlists tracks.- Parameters:
playlist_id- The playlists ID.- Returns:
- A
GetPlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
removeTracksFromPlaylist
@Deprecated public RemoveTracksFromPlaylistRequest.Builder removeTracksFromPlaylist(String user_id, String playlist_id, com.google.gson.JsonArray tracks)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Delete tracks from a playlist- Parameters:
user_id- The owners username.playlist_id- The playlists ID.tracks- URIs of the tracks to remove. Maximum: 100 track URIs.- Returns:
- A
RemoveTracksFromPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
removeTracksFromPlaylist
public RemoveTracksFromPlaylistRequest.Builder removeTracksFromPlaylist(String playlist_id, com.google.gson.JsonArray tracks)Delete tracks from a playlist- Parameters:
playlist_id- The playlists ID.tracks- URIs of the tracks to remove. Maximum: 100 track URIs.- Returns:
- A
RemoveTracksFromPlaylistRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
reorderPlaylistsTracks
@Deprecated public ReorderPlaylistsTracksRequest.Builder reorderPlaylistsTracks(String user_id, String playlist_id, int range_start, int insert_before)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Reorder a track or a group of tracks in a playlist.
When reordering tracks, the timestamp indicating when they were added and the user who added them will be kept untouched. In addition, the users following the playlists won’t be notified about changes in the playlists when the tracks are reordered.
- Parameters:
user_id- The user's Spotify user ID.playlist_id- The Spotify ID for the playlist.range_start- The position of the first track to be reordered.insert_before- The position where the tracks should be inserted. To reorder the tracks to the end of the playlist, simply set insert_before to the position after the last track.- Returns:
- A
ReorderPlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
reorderPlaylistsTracks
public ReorderPlaylistsTracksRequest.Builder reorderPlaylistsTracks(String playlist_id, int range_start, int insert_before)Reorder a track or a group of tracks in a playlist.
When reordering tracks, the timestamp indicating when they were added and the user who added them will be kept untouched. In addition, the users following the playlists won’t be notified about changes in the playlists when the tracks are reordered.
- Parameters:
playlist_id- The Spotify ID for the playlist.range_start- The position of the first track to be reordered.insert_before- The position where the tracks should be inserted. To reorder the tracks to the end of the playlist, simply set insert_before to the position after the last track.- Returns:
- A
ReorderPlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
replacePlaylistsTracks
@Deprecated public ReplacePlaylistsTracksRequest.Builder replacePlaylistsTracks(String user_id, String playlist_id, String[] uris)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Replace tracks in a playlist.- Parameters:
user_id- The owners username.playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- A
ReplacePlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
replacePlaylistsTracks
public ReplacePlaylistsTracksRequest.Builder replacePlaylistsTracks(String playlist_id, String[] uris)Replace tracks in a playlist.- Parameters:
playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- A
ReplacePlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
replacePlaylistsTracks
@Deprecated public ReplacePlaylistsTracksRequest.Builder replacePlaylistsTracks(String user_id, String playlist_id, com.google.gson.JsonArray uris)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Replace tracks in a playlist.- Parameters:
user_id- The owners username.playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- A
ReplacePlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
replacePlaylistsTracks
public ReplacePlaylistsTracksRequest.Builder replacePlaylistsTracks(String playlist_id, com.google.gson.JsonArray uris)Replace tracks in a playlist.- Parameters:
playlist_id- The playlists ID.uris- URIs of the tracks to add. Maximum: 100 track URIs.- Returns:
- A
ReplacePlaylistsTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
uploadCustomPlaylistCoverImage
@Deprecated public UploadCustomPlaylistCoverImageRequest.Builder uploadCustomPlaylistCoverImage(String user_id, String playlist_id)Deprecated.Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)Replace the image used to represent a specific playlist.- Parameters:
user_id- The user's Spotify user ID.playlist_id- The Spotify ID for the playlist.- Returns:
- An
UploadCustomPlaylistCoverImageRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
uploadCustomPlaylistCoverImage
public UploadCustomPlaylistCoverImageRequest.Builder uploadCustomPlaylistCoverImage(String playlist_id)Replace the image used to represent a specific playlist.- Parameters:
playlist_id- The Spotify ID for the playlist.- Returns:
- An
UploadCustomPlaylistCoverImageRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
searchItem
Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.- Parameters:
q- The search query's keywords (and optional field filters and operators).type- A comma-separated list of item types to search across. Valid types are: album, artist, playlist, and track.- Returns:
- A
SearchItemRequest.Builder.
-
searchAlbums
Get Spotify catalog information about albums that match a keyword string.- Parameters:
q- The search query's keywords (and optional field filters and operators).- Returns:
- A
SearchAlbumsRequest.Builder.
-
searchAlbumsSpecial
Get Spotify catalog information about albums that match a keyword string.This method exists because the searches API returns the undocumented property
totalTracks, which is included by this method's return type.- Parameters:
q- The search query's keywords (and optional field filters and operators).- Returns:
- A
SearchAlbumsSpecialRequest.Builder.
-
searchArtists
Get Spotify catalog information about artists that match a keyword string.- Parameters:
q- The search query's keywords (and optional field filters and operators).- Returns:
- A
SearchArtistsRequest.Builder.
-
searchPlaylists
Get Spotify catalog information about playlists that match a keyword string.- Parameters:
q- The search query's keywords (and optional field filters and operators).- Returns:
- A
SearchPlaylistsRequest.Builder.
-
searchTracks
Get Spotify catalog information about tracks that match a keyword string.- Parameters:
q- The search query's keywords (and optional field filters and operators).- Returns:
- A
SearchTracksRequest.Builder.
-
getAudioAnalysisForTrack
Get a detailed audio analysis for a single track identified by its unique Spotify ID.- Parameters:
id- The Spotify ID for the track.- Returns:
- A
GetAudioAnalysisForTrackRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getAudioFeaturesForTrack
Get audio features for a track based on its Spotify ID.- Parameters:
id- The Spotify ID of the track.- Returns:
- A
GetAudioFeaturesForTrackRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getAudioFeaturesForSeveralTracks
public GetAudioFeaturesForSeveralTracksRequest.Builder getAudioFeaturesForSeveralTracks(String... ids)Get audio features for multiple tracks based on their Spotify IDs.- Parameters:
ids- A comma-separated list of the Spotify IDs for the tracks. Maximum: 100 IDs.- Returns:
- A
GetAudioFeaturesForSeveralTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getSeveralTracks
Get multiple tracks.- Parameters:
ids- The Spotify IDs of all tracks you're trying to retrieve. Maximum: 50 IDs.- Returns:
- A
GetSeveralTracksRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getTrack
Get a track.- Parameters:
id- The Spotify ID of the track.- Returns:
- A
GetTrackRequest.Builder. - See Also:
- Spotify: URLs & IDs
-
getCurrentUsersProfile
Get detailed profile information about the current user (including the current user’s username).- Returns:
- A
GetCurrentUsersProfileRequest.Builder.
-
getUsersProfile
Get public profile information about a Spotify user.- Parameters:
user_id- The Spotify ID of the user.- Returns:
- A
GetUsersProfileRequest.Builder. - See Also:
- Spotify: URLs & IDs
-