diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 000000000..f6da8875d
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,43 @@
+# Java Gradle CircleCI 2.0 configuration file
+#
+# Check https://circleci.com/docs/2.0/language-java/ for more details
+#
+version: 2
+jobs:
+ build:
+ docker:
+ # specify the version you desire here
+ - image: circleci/openjdk:8-jdk
+
+ # Specify service dependencies here if necessary
+ # CircleCI maintains a library of pre-built images
+ # documented at https://circleci.com/docs/2.0/circleci-images/
+ # - image: circleci/postgres:9.4
+
+ working_directory: ~/repo
+
+ environment:
+ # Customize the JVM maximum heap limit
+ JVM_OPTS: -Xmx3200m
+ TERM: dumb
+
+ steps:
+ - checkout
+
+ # Download and cache dependencies
+ - restore_cache:
+ keys:
+ - v1-dependencies-{{ checksum "build.gradle" }}
+ # fallback to using the latest cache if no exact match is found
+ - v1-dependencies-
+
+ - run: gradle dependencies
+
+ - save_cache:
+ paths:
+ - ~/.gradle
+ key: v1-dependencies-{{ checksum "build.gradle" }}
+
+ # run tests!
+ - run: gradle test -PclientId=$SPOTIFY_CLIENT_ID -PclientSecret=$SPOTIFY_CLIENT_SECRET
+
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000..dd84ea782
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,38 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+ - Device: [e.g. iPhone6]
+ - OS: [e.g. iOS8.1]
+ - Browser [e.g. stock browser, safari]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 000000000..bbcbbe7d6
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..25fe34f3e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,127 @@
+
+# Created by https://www.gitignore.io/api/gradle,kotlin,intellij
+# Edit at https://www.gitignore.io/?templates=gradle,kotlin,intellij
+
+### Intellij ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+.idea/modules.xml
+.idea/*.iml
+.idea/modules
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### Intellij Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# *.iml
+# modules.xml
+# .idea/misc.xml
+# *.ipr
+
+# Sonarlint plugin
+.idea/sonarlint
+
+### Kotlin ###
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+### Gradle ###
+.gradle
+/build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+# Cache of project
+.gradletasknamecache
+
+# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
+# gradle/wrapper/gradle-wrapper.properties
+
+### Gradle Patch ###
+**/build/
+
+# End of https://www.gitignore.io/api/gradle,kotlin,intellij
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 000000000..72a2b31f2
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+SpotifyKotlinWrapper
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 000000000..6e6eec114
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,6 @@
+
public enum AuthorizationType
+Enum Constant and Description | +
---|
APPLICATION |
+
CLIENT |
+
public static AuthorizationType CLIENT+
public static AuthorizationType APPLICATION+
public class BuilderKt
+Modifier and Type | +Method and Description | +
---|---|
static SpotifyApiBuilderDsl |
+spotifyApi(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiBuilderDsl,kotlin.Unit> block)
+A builder DSL to create a new
+class SpotifyAPI |
+
public static SpotifyApiBuilderDsl spotifyApi(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiBuilderDsl,kotlin.Unit> block)+
A builder DSL to create a new class SpotifyAPI
class SpotifyAPI
public class SpotifyAPI
+Represents an instance of the Spotify API client, with common
+functionality and information between the class SpotifyClientAPI
and class SpotifyAppAPI
+implementations of the API
class SpotifyClientAPI
,
+class SpotifyAppAPI
Modifier and Type | +Method and Description | +
---|---|
void |
+clearCache()
+If the cache is enabled, clear all stored queries in the cache
+ |
+
AlbumAPI |
+getAlbums()
+Provides access to Spotify album endpoints
+ |
+
SpotifyApiBuilder |
+getApiBuilder()
+Return a new
+class SpotifyApiBuilder with the parameters provided to this api instance |
+
SpotifyApiBuilderDsl |
+getApiBuilderDsl()
+Return a new
+class SpotifyApiBuilderDsl with the parameters provided to this api instance |
+
ArtistsAPI |
+getArtists()
+Provides access to Spotify artist endpoints
+ |
+
java.lang.String |
+getAuthorizationUrl(SpotifyScope[] scopes,
+ java.lang.String redirectUri)
+Create a Spotify authorization URL from which client access can be obtained
+ |
+
boolean |
+getAutomaticRefresh() |
+
BrowseAPI |
+getBrowse()
+Provides access to Spotify browse endpoints
+ |
+
java.util.Map<com.adamratzman.spotify.http.SpotifyRequest,com.adamratzman.spotify.http.CacheState> |
+getCache()
+Obtain a map of all currently-cached requests
+ |
+
java.lang.Integer |
+getCacheLimit()
+The maximum amount of cached requests allowed at one time.
+ |
+
java.lang.String |
+getClientId()
+The application client id found on the application
+ |
+
java.lang.String |
+getClientSecret()
+The application client secret found on the application
+ |
+
java.util.List<com.adamratzman.spotify.http.SpotifyEndpoint> |
+getEndpoints()
+A list of all endpoints included in this api type
+ |
+
java.util.concurrent.ScheduledExecutorService |
+getExecutor() |
+
long |
+getExpireTime() |
+
FollowingAPI |
+getFollowing() |
+
SpotifyLogger |
+getLogger()
+The Spotify event logger
+ |
+
PlaylistAPI |
+getPlaylists() |
+
boolean |
+getRetryWhenRateLimited() |
+
SearchAPI |
+getSearch()
+Provides access to the Spotify search endpoint
+ |
+
Token |
+getToken()
+The access token associated with this API instance
+ |
+
TracksAPI |
+getTracks()
+Provides access to Spotify track endpoints
+ |
+
boolean |
+getUseCache()
+Whether to use the built-in cache to avoid making unnecessary calls to
+the Spotify API
+ |
+
UserAPI |
+getUsers() |
+
TokenValidityResponse |
+isTokenValid(boolean makeTestRequest)
+Tests whether the current token is actually valid. By default, an endpoint is called once to verify
+validity.
+ |
+
Token |
+refreshToken()
+If the method used to create the token supports token refresh and
+the information in token is accurate, attempt to refresh the token
+ |
+
void |
+setAutomaticRefresh(boolean p) |
+
void |
+setCacheLimit(java.lang.Integer p)
+The maximum amount of cached requests allowed at one time.
+ |
+
void |
+setRetryWhenRateLimited(boolean p) |
+
void |
+setToken(Token p)
+The access token associated with this API instance
+ |
+
void |
+setUseCache(boolean value)
+Whether to use the built-in cache to avoid making unnecessary calls to
+the Spotify API
+ |
+
void |
+useLogger(boolean enable)
+Allows enabling and disabling the logger
+ |
+
public boolean getUseCache()+
Whether to use the built-in cache to avoid making unnecessary calls to +the Spotify API
public void setUseCache(boolean value)+
Whether to use the built-in cache to avoid making unnecessary calls to +the Spotify API
public SpotifyLogger getLogger()+
The Spotify event logger
public long getExpireTime()+
public java.util.concurrent.ScheduledExecutorService getExecutor()+
public SearchAPI getSearch()+
Provides access to the Spotify search endpoint
public AlbumAPI getAlbums()+
Provides access to Spotify album endpoints
public BrowseAPI getBrowse()+
Provides access to Spotify browse endpoints
public ArtistsAPI getArtists()+
Provides access to Spotify artist endpoints
public PlaylistAPI getPlaylists()+
public UserAPI getUsers()+
public TracksAPI getTracks()+
Provides access to Spotify track endpoints
public FollowingAPI getFollowing()+
public java.util.Map<com.adamratzman.spotify.http.SpotifyRequest,com.adamratzman.spotify.http.CacheState> getCache()+
Obtain a map of all currently-cached requests
public Token refreshToken()+
If the method used to create the token supports token refresh and +the information in token is accurate, attempt to refresh the token
public java.util.List<com.adamratzman.spotify.http.SpotifyEndpoint> getEndpoints()+
A list of all endpoints included in this api type
public void clearCache()+
If the cache is enabled, clear all stored queries in the cache
public SpotifyApiBuilder getApiBuilder()+
Return a new class SpotifyApiBuilder
with the parameters provided to this api instance
class SpotifyApiBuilder
public SpotifyApiBuilderDsl getApiBuilderDsl()+
Return a new class SpotifyApiBuilderDsl
with the parameters provided to this api instance
class SpotifyApiBuilderDsl
public void useLogger(boolean enable)+
Allows enabling and disabling the logger
enable
- Whether to enable the loggerpublic java.lang.String getAuthorizationUrl(SpotifyScope[] scopes, + java.lang.String redirectUri)+
Create a Spotify authorization URL from which client access can be obtained
scopes
- The scopes that the application should have access toredirectUri
- The redirect uri specified on the Spotify developer dashboard; where to
+redirect the browser after authenticationpublic TokenValidityResponse isTokenValid(boolean makeTestRequest)+
Tests whether the current token is actually valid. By default, an endpoint is called once to verify +validity.
makeTestRequest
- Whether to also make an endpoint request to verify authentication.class TokenValidityResponse
containing whether this token is valid, and if not, an Exception explaining whypublic java.lang.String getClientId()+
The application client id found on the application
public java.lang.String getClientSecret()+
The application client secret found on the application
public Token getToken()+
The access token associated with this API instance
public void setToken(Token p)+
The access token associated with this API instance
p
- The access token associated with this API instancepublic java.lang.Integer getCacheLimit()+
The maximum amount of cached requests allowed at one time.
Null means no limit
public void setCacheLimit(java.lang.Integer p)+
The maximum amount of cached requests allowed at one time.
Null means no limit
p
- The maximum amount of cached requests allowed at one time. Null means no limitpublic boolean getAutomaticRefresh()+
public void setAutomaticRefresh(boolean p)+
public boolean getRetryWhenRateLimited()+
public void setRetryWhenRateLimited(boolean p)+
public class SpotifyAPIKt
+Modifier and Type | +Method and Description | +
---|---|
static java.lang.String |
+getAuthUrlFull(SpotifyScope[] scopes,
+ java.lang.String clientId,
+ java.lang.String redirectUri) |
+
static Token |
+getCredentialedToken(java.lang.String clientId,
+ java.lang.String clientSecret,
+ SpotifyAPI api) |
+
public static java.lang.String getAuthUrlFull(SpotifyScope[] scopes, + java.lang.String clientId, + java.lang.String redirectUri)+
public static Token getCredentialedToken(java.lang.String clientId, + java.lang.String clientSecret, + SpotifyAPI api)+
public class SpotifyApiBuilder
+Spotify traditional Java style API builder
Constructor and Description | +
---|
SpotifyApiBuilder(java.lang.String clientId,
+ java.lang.String clientSecret)
+Spotify traditional Java style API builder
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyApiBuilder |
+authorizationCode(java.lang.String authorizationCode)
+Set a returned authorization code
+ |
+
SpotifyApiBuilder |
+automaticRefresh(boolean automaticRefresh)
+Enable or disable automatic refresh of the Spotify access token
+ |
+
SpotifyAPI |
+build(AuthorizationType type)
+Create a
+class SpotifyAPI instance with the given class SpotifyApiBuilder parameters and the type -
+AuthorizationType.CLIENT for client authentication, or otherwise AuthorizationType.APPLICATION |
+
SpotifyClientAPI |
+buildClient()
+Create a new
+class SpotifyClientAPI that has access to public endpoints, in addition to endpoints
+requiring scopes contained in the client authorization request |
+
SpotifyAPI |
+buildCredentialed()
+Create a new
+class SpotifyAppAPI that only has access to public endpoints and data |
+
SpotifyAPI |
+buildPublic()
+Create a new
+class SpotifyAppAPI that only has access to public endpoints and data |
+
SpotifyApiBuilder |
+cacheLimit(java.lang.Integer cacheLimit)
+Set the maximum allowed amount of cached requests at one time. Null means no limit
+ |
+
SpotifyApiBuilder |
+clientId(java.lang.String clientId)
+Set the application client id
+ |
+
SpotifyApiBuilder |
+clientSecret(java.lang.String clientSecret)
+Set the application client secret
+ |
+
SpotifyApiBuilder |
+enableAllUtilities(boolean enableAllUtilities)
+Set whether to enable all utilities (
+SpotifyApiBuilder.automaticRefresh , SpotifyApiBuilder.retryWhenRateLimited , SpotifyApiBuilder.useCache , SpotifyApiBuilder.enableLogger , SpotifyApiBuilder.testTokenValidity ) |
+
SpotifyApiBuilder |
+enableLogger(boolean enableLogger)
+Set whether to enable to the exception logger
+ |
+
SpotifyApiBuilder |
+redirectUri(java.lang.String redirectUri)
+Set the application redirect uri
+ |
+
SpotifyApiBuilder |
+retryWhenRateLimited(boolean retryWhenRateLimited)
+Set whether to block the current thread and wait until the API can retry the request
+ |
+
SpotifyApiBuilder |
+testTokenValidity(boolean testTokenValidity)
+After API creation, set whether to test whether the token is valid by performing a lightweight request
+ |
+
SpotifyApiBuilder |
+token(Token token)
+Set the token to be used with this api instance
+ |
+
SpotifyApiBuilder |
+tokenString(java.lang.String tokenString)
+If you only have an access token, the api can be instantiated with it
+ |
+
SpotifyApiBuilder |
+useCache(boolean useCache)
+Set whether to cache requests. Default: true
+ |
+
public SpotifyApiBuilder(java.lang.String clientId, + java.lang.String clientSecret)+
Spotify traditional Java style API builder
public SpotifyApiBuilder enableAllUtilities(boolean enableAllUtilities)+
Set whether to enable all utilities (SpotifyApiBuilder.automaticRefresh
, SpotifyApiBuilder.retryWhenRateLimited
, SpotifyApiBuilder.useCache
, SpotifyApiBuilder.enableLogger
, SpotifyApiBuilder.testTokenValidity
)
public SpotifyApiBuilder testTokenValidity(boolean testTokenValidity)+
After API creation, set whether to test whether the token is valid by performing a lightweight request
public SpotifyApiBuilder clientId(java.lang.String clientId)+
Set the application client id
public SpotifyApiBuilder clientSecret(java.lang.String clientSecret)+
Set the application client secret
public SpotifyApiBuilder useCache(boolean useCache)+
Set whether to cache requests. Default: true
public SpotifyApiBuilder cacheLimit(java.lang.Integer cacheLimit)+
Set the maximum allowed amount of cached requests at one time. Null means no limit
public SpotifyApiBuilder redirectUri(java.lang.String redirectUri)+
Set the application redirect uri
public SpotifyApiBuilder authorizationCode(java.lang.String authorizationCode)+
Set a returned authorization code
public SpotifyApiBuilder tokenString(java.lang.String tokenString)+
If you only have an access token, the api can be instantiated with it
public SpotifyApiBuilder token(Token token)+
Set the token to be used with this api instance
public SpotifyApiBuilder automaticRefresh(boolean automaticRefresh)+
Enable or disable automatic refresh of the Spotify access token
public SpotifyApiBuilder retryWhenRateLimited(boolean retryWhenRateLimited)+
Set whether to block the current thread and wait until the API can retry the request
public SpotifyApiBuilder enableLogger(boolean enableLogger)+
Set whether to enable to the exception logger
public SpotifyAPI build(AuthorizationType type)+
Create a class SpotifyAPI
instance with the given class SpotifyApiBuilder
parameters and the type -
+AuthorizationType.CLIENT for client authentication, or otherwise AuthorizationType.APPLICATION
class SpotifyAPI
,
+class SpotifyApiBuilder
public SpotifyAPI buildPublic()+
Create a new class SpotifyAppAPI
that only has access to public endpoints and data
class SpotifyAppAPI
public SpotifyAPI buildCredentialed()+
Create a new class SpotifyAppAPI
that only has access to public endpoints and data
class SpotifyAppAPI
public SpotifyClientAPI buildClient()+
Create a new class SpotifyClientAPI
that has access to public endpoints, in addition to endpoints
+requiring scopes contained in the client authorization request
class SpotifyClientAPI
public class SpotifyApiBuilderDsl
+Spotify API mutable parameters
Constructor and Description | +
---|
SpotifyApiBuilderDsl()
+Spotify API mutable parameters
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+authentication(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyUserAuthorizationBuilder,kotlin.Unit> block)
+Allows you to authenticate a
+class SpotifyClientAPI with an authorization code
+or build class SpotifyAPI using a refresh token |
+
SpotifyClientAPI |
+buildClient()
+Build the client api using a provided authorization code, token string, or token object (only one of which
+is necessary)
+ |
+
void |
+buildClientAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyClientAPI,kotlin.Unit> consumer)
+Build the client api using a provided authorization code, token string, or token object (only one of which
+is necessary)
+ |
+
SpotifyAPI |
+buildCredentialed()
+Build a public
+class SpotifyAppAPI using the provided credentials |
+
void |
+buildCredentialedAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyAPI,kotlin.Unit> consumer)
+Build a public
+class SpotifyAppAPI using the provided credentials |
+
void |
+config(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiOptionsBuilder,kotlin.Unit> block)
+Allows you to override default values for caching, token refresh, and logging
+ |
+
void |
+credentials(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyCredentialsBuilder,kotlin.Unit> block)
+A block in which Spotify application credentials (accessible via the Spotify dashboard)
+should be put
+ |
+
java.lang.String |
+getAuthorizationUrl(com.adamratzman.spotify.SpotifyScope scopes)
+Create a Spotify authorization URL from which client access can be obtained
+ |
+
void |
+options(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiOptionsBuilder,kotlin.Unit> block)
+Allows you to override default values for caching, token refresh, and logging
+ |
+
void |
+utilities(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiOptionsBuilder,kotlin.Unit> block)
+Allows you to override default values for caching, token refresh, and logging
+ |
+
public SpotifyApiBuilderDsl()+
Spotify API mutable parameters
public void credentials(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyCredentialsBuilder,kotlin.Unit> block)+
A block in which Spotify application credentials (accessible via the Spotify dashboard) +should be put
public void authentication(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyUserAuthorizationBuilder,kotlin.Unit> block)+
Allows you to authenticate a class SpotifyClientAPI
with an authorization code
+or build class SpotifyAPI
using a refresh token
class SpotifyClientAPI
,
+class SpotifyAPI
public void utilities(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiOptionsBuilder,kotlin.Unit> block)+
Allows you to override default values for caching, token refresh, and logging
public void config(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiOptionsBuilder,kotlin.Unit> block)+
Allows you to override default values for caching, token refresh, and logging
public void options(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiOptionsBuilder,kotlin.Unit> block)+
Allows you to override default values for caching, token refresh, and logging
public java.lang.String getAuthorizationUrl(com.adamratzman.spotify.SpotifyScope scopes)+
Create a Spotify authorization URL from which client access can be obtained
scopes
- The scopes that the application should have access topublic void buildCredentialedAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyAPI,kotlin.Unit> consumer)+
Build a public class SpotifyAppAPI
using the provided credentials
Provide a consumer object to be executed after the api has been successfully built
class SpotifyAppAPI
public SpotifyAPI buildCredentialed()+
Build a public class SpotifyAppAPI
using the provided credentials
class SpotifyAppAPI
public void buildClientAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyClientAPI,kotlin.Unit> consumer)+
Build the client api using a provided authorization code, token string, or token object (only one of which +is necessary)
Provide a consumer object to be executed after the client has been successfully built
public SpotifyClientAPI buildClient()+
Build the client api using a provided authorization code, token string, or token object (only one of which +is necessary)
public class SpotifyApiBuilderJava
+Constructor and Description | +
---|
SpotifyApiBuilderJava(java.lang.String clientId,
+ java.lang.String clientSecret) |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyApiBuilderJava |
+authorizationCode(java.lang.String authorizationCode) |
+
SpotifyClientAPI |
+buildClient(boolean automaticRefresh) |
+
SpotifyAPI |
+buildCredentialed() |
+
java.lang.String |
+getAuthorizationCode() |
+
java.lang.String |
+getClientId() |
+
java.lang.String |
+getClientSecret() |
+
java.lang.String |
+getRedirectUri() |
+
Token |
+getToken() |
+
java.lang.String |
+getTokenString() |
+
boolean |
+getUseCache() |
+
SpotifyApiBuilderJava |
+redirectUri(java.lang.String redirectUri) |
+
void |
+setAuthorizationCode(java.lang.String p) |
+
void |
+setRedirectUri(java.lang.String p) |
+
void |
+setToken(Token p) |
+
void |
+setTokenString(java.lang.String p) |
+
void |
+setUseCache(boolean p) |
+
SpotifyApiBuilderJava |
+token(Token token) |
+
SpotifyApiBuilderJava |
+tokenString(java.lang.String tokenString) |
+
SpotifyApiBuilderJava |
+useCache(boolean useCache) |
+
public SpotifyApiBuilderJava(java.lang.String clientId, + java.lang.String clientSecret)+
public java.lang.String getRedirectUri()+
public void setRedirectUri(java.lang.String p)+
public java.lang.String getAuthorizationCode()+
public void setAuthorizationCode(java.lang.String p)+
public java.lang.String getTokenString()+
public void setTokenString(java.lang.String p)+
public Token getToken()+
public void setToken(Token p)+
public boolean getUseCache()+
public void setUseCache(boolean p)+
public SpotifyApiBuilderJava useCache(boolean useCache)+
public SpotifyApiBuilderJava redirectUri(java.lang.String redirectUri)+
public SpotifyApiBuilderJava authorizationCode(java.lang.String authorizationCode)+
public SpotifyApiBuilderJava tokenString(java.lang.String tokenString)+
public SpotifyApiBuilderJava token(Token token)+
public SpotifyAPI buildCredentialed()+
public SpotifyClientAPI buildClient(boolean automaticRefresh)+
public java.lang.String getClientId()+
public java.lang.String getClientSecret()+
public class SpotifyAppAPI
+extends SpotifyAPI
+An API instance created with application credentials, not through +client authentication
Modifier and Type | +Method and Description | +
---|---|
AlbumAPI |
+getAlbums()
+Provides access to Spotify album endpoints
+ |
+
SpotifyApiBuilder |
+getApiBuilder()
+Return a new
+class SpotifyApiBuilder with the parameters provided to this api instance |
+
SpotifyApiBuilderDsl |
+getApiBuilderDsl()
+Return a new
+class SpotifyApiBuilderDsl with the parameters provided to this api instance |
+
ArtistsAPI |
+getArtists()
+Provides access to Spotify artist endpoints
+ |
+
BrowseAPI |
+getBrowse()
+Provides access to Spotify browse endpoints
+ |
+
java.util.List<com.adamratzman.spotify.http.SpotifyEndpoint> |
+getEndpoints()
+A list of all endpoints included in this api type
+ |
+
FollowingAPI |
+getFollowing()
+Provides access to public playlist follower information
+ |
+
PlaylistAPI |
+getPlaylists()
+Provides access to public Spotify playlist endpoints
+ |
+
SearchAPI |
+getSearch()
+Provides access to the Spotify search endpoint
+ |
+
TracksAPI |
+getTracks()
+Provides access to Spotify track endpoints
+ |
+
UserAPI |
+getUsers()
+Provides access to public Spotify user information
+ |
+
Token |
+refreshToken()
+If the method used to create the token supports token refresh and
+the information in token is accurate, attempt to refresh the token
+ |
+
clearCache, getAlbums, getApiBuilder, getApiBuilderDsl, getArtists, getAuthorizationUrl, getAutomaticRefresh, getBrowse, getCache, getCacheLimit, getClientId, getClientSecret, getEndpoints, getExecutor, getExpireTime, getFollowing, getLogger, getPlaylists, getRetryWhenRateLimited, getSearch, getToken, getTracks, getUseCache, getUsers, isTokenValid, refreshToken, setAutomaticRefresh, setCacheLimit, setRetryWhenRateLimited, setToken, setUseCache, useLogger
public SearchAPI getSearch()+
Provides access to the Spotify search endpoint
public AlbumAPI getAlbums()+
Provides access to Spotify album endpoints
public BrowseAPI getBrowse()+
Provides access to Spotify browse endpoints
public ArtistsAPI getArtists()+
Provides access to Spotify artist endpoints
public TracksAPI getTracks()+
Provides access to Spotify track endpoints
public PlaylistAPI getPlaylists()+
Provides access to public Spotify playlist endpoints
public UserAPI getUsers()+
Provides access to public Spotify user information
public FollowingAPI getFollowing()+
Provides access to public playlist follower information
public Token refreshToken()+
If the method used to create the token supports token refresh and +the information in token is accurate, attempt to refresh the token
public java.util.List<com.adamratzman.spotify.http.SpotifyEndpoint> getEndpoints()+
A list of all endpoints included in this api type
public SpotifyApiBuilder getApiBuilder()+
Return a new class SpotifyApiBuilder
with the parameters provided to this api instance
class SpotifyApiBuilder
public SpotifyApiBuilderDsl getApiBuilderDsl()+
Return a new class SpotifyApiBuilderDsl
with the parameters provided to this api instance
class SpotifyApiBuilderDsl
public class SpotifyClientAPI
+extends SpotifyAPI
+An API instance created through client authentication, with access to private information +managed through the scopes exposed in token
Modifier and Type | +Method and Description | +
---|---|
AlbumAPI |
+getAlbums()
+Provides access to Spotify album endpoints
+ |
+
SpotifyApiBuilder |
+getApiBuilder()
+Return a new
+class SpotifyApiBuilder with the parameters provided to this api instance |
+
SpotifyApiBuilderDsl |
+getApiBuilderDsl()
+Return a new
+class SpotifyApiBuilderDsl with the parameters provided to this api instance |
+
ArtistsAPI |
+getArtists()
+Provides access to Spotify artist endpoints
+ |
+
java.lang.String |
+getAuthorizationUrl(com.adamratzman.spotify.SpotifyScope scopes)
+Create a Spotify authorization URL from which client access can be obtained
+ |
+
BrowseAPI |
+getBrowse()
+Provides access to Spotify browse endpoints
+ |
+
java.util.List<com.adamratzman.spotify.http.SpotifyEndpoint> |
+getEndpoints()
+A list of all endpoints included in this api type
+ |
+
ClientFollowingAPI |
+getFollowing()
+Provides access to endpoints for managing
+the artists, users, and playlists that a Spotify user follows.
+Superset of
+class FollowingAPI |
+
ClientLibraryAPI |
+getLibrary()
+Provides access to endpoints for
+retrieving information about, and managing, tracks that the current user has saved in their “Your Music” library.
+ |
+
ClientPersonalizationAPI |
+getPersonalization()
+Provides access to endpoints for
+retrieving information about the user’s listening habits.
+ |
+
ClientPlayerAPI |
+getPlayer()
+Provides access to the beta player api,
+including track playing and pausing endpoints.
+ |
+
ClientPlaylistAPI |
+getPlaylists()
+Provides access to endpoints for retrieving
+information about a user’s playlists and for managing a user’s playlists.
+Superset of
+class PlaylistAPI |
+
java.lang.String |
+getRedirectUri() |
+
SearchAPI |
+getSearch()
+Provides access to the Spotify search endpoint
+ |
+
TracksAPI |
+getTracks()
+Provides access to Spotify track endpoints
+ |
+
java.lang.String |
+getUserId()
+The Spotify user id to which the api instance is connected
+ |
+
ClientUserAPI |
+getUsers()
+Provides access to endpoints for
+retrieving information about a user’s profile.
+Superset of
+class UserAPI |
+
boolean |
+hasScope(SpotifyScope scope)
+Whether the current access token allows access to scope scope
+ |
+
boolean |
+hasScopes(SpotifyScope scope,
+ com.adamratzman.spotify.SpotifyScope scopes)
+Whether the current access token allows access to all of the provided scopes
+ |
+
Token |
+refreshToken()
+If the method used to create the token supports token refresh and
+the information in token is accurate, attempt to refresh the token
+ |
+
void |
+setRedirectUri(java.lang.String p) |
+
void |
+shutdown()
+Stop all automatic functions like refreshToken or clearCache and shut down the scheduled
+executor
+ |
+
clearCache, getAlbums, getApiBuilder, getApiBuilderDsl, getArtists, getAuthorizationUrl, getAutomaticRefresh, getBrowse, getCache, getCacheLimit, getClientId, getClientSecret, getEndpoints, getExecutor, getExpireTime, getFollowing, getLogger, getPlaylists, getRetryWhenRateLimited, getSearch, getToken, getTracks, getUseCache, getUsers, isTokenValid, refreshToken, setAutomaticRefresh, setCacheLimit, setRetryWhenRateLimited, setToken, setUseCache, useLogger
public SearchAPI getSearch()+
Provides access to the Spotify search endpoint
public AlbumAPI getAlbums()+
Provides access to Spotify album endpoints
public BrowseAPI getBrowse()+
Provides access to Spotify browse endpoints
public ArtistsAPI getArtists()+
Provides access to Spotify artist endpoints
public TracksAPI getTracks()+
Provides access to Spotify track endpoints
public ClientPlaylistAPI getPlaylists()+
Provides access to endpoints for retrieving
+information about a user’s playlists and for managing a user’s playlists.
+Superset of class PlaylistAPI
class PlaylistAPI
public ClientUserAPI getUsers()+
Provides access to endpoints for
+retrieving information about a user’s profile.
+Superset of class UserAPI
class UserAPI
public ClientFollowingAPI getFollowing()+
Provides access to endpoints for managing
+the artists, users, and playlists that a Spotify user follows.
+Superset of class FollowingAPI
class FollowingAPI
public ClientPersonalizationAPI getPersonalization()+
Provides access to endpoints for +retrieving information about the user’s listening habits.
public ClientLibraryAPI getLibrary()+
Provides access to endpoints for +retrieving information about, and managing, tracks that the current user has saved in their “Your Music” library.
public ClientPlayerAPI getPlayer()+
Provides access to the beta player api, +including track playing and pausing endpoints.
Please consult the usage guide before +calling any endpoint in this api.
These endpoints may break at any time.
public java.lang.String getUserId()+
The Spotify user id to which the api instance is connected
public void shutdown()+
Stop all automatic functions like refreshToken or clearCache and shut down the scheduled +executor
public Token refreshToken()+
If the method used to create the token supports token refresh and +the information in token is accurate, attempt to refresh the token
public java.util.List<com.adamratzman.spotify.http.SpotifyEndpoint> getEndpoints()+
A list of all endpoints included in this api type
public SpotifyApiBuilder getApiBuilder()+
Return a new class SpotifyApiBuilder
with the parameters provided to this api instance
class SpotifyApiBuilder
public SpotifyApiBuilderDsl getApiBuilderDsl()+
Return a new class SpotifyApiBuilderDsl
with the parameters provided to this api instance
class SpotifyApiBuilderDsl
public java.lang.String getAuthorizationUrl(com.adamratzman.spotify.SpotifyScope scopes)+
Create a Spotify authorization URL from which client access can be obtained
scopes
- The scopes that the application should have access topublic boolean hasScope(SpotifyScope scope)+
Whether the current access token allows access to scope scope
public boolean hasScopes(SpotifyScope scope, + com.adamratzman.spotify.SpotifyScope scopes)+
Whether the current access token allows access to all of the provided scopes
public java.lang.String getRedirectUri()+
public void setRedirectUri(java.lang.String p)+
public class SpotifyCredentials
+Constructor and Description | +
---|
SpotifyCredentials(java.lang.String clientId,
+ java.lang.String clientSecret,
+ java.lang.String redirectUri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
java.lang.String |
+component3() |
+
SpotifyCredentials |
+copy(java.lang.String clientId,
+ java.lang.String clientSecret,
+ java.lang.String redirectUri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getClientId() |
+
java.lang.String |
+getClientSecret() |
+
java.lang.String |
+getRedirectUri() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyCredentials(java.lang.String clientId, + java.lang.String clientSecret, + java.lang.String redirectUri)+
public java.lang.String getClientId()+
public java.lang.String getClientSecret()+
public java.lang.String getRedirectUri()+
public java.lang.String component1()+
public java.lang.String component2()+
public java.lang.String component3()+
public SpotifyCredentials copy(java.lang.String clientId, + java.lang.String clientSecret, + java.lang.String redirectUri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyCredentialsBuilder
+A holder for application-specific credentials
Constructor and Description | +
---|
SpotifyCredentialsBuilder()
+A holder for application-specific credentials
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyCredentials |
+build() |
+
java.lang.String |
+getClientId()
+the client id of your Spotify application
+ |
+
java.lang.String |
+getClientSecret()
+the client secret of your Spotify application
+ |
+
java.lang.String |
+getRedirectUri()
+nullable redirect uri (use if you're doing client authentication
+ |
+
void |
+setClientId(java.lang.String p)
+the client id of your Spotify application
+ |
+
void |
+setClientSecret(java.lang.String p)
+the client secret of your Spotify application
+ |
+
void |
+setRedirectUri(java.lang.String p)
+nullable redirect uri (use if you're doing client authentication
+ |
+
public SpotifyCredentialsBuilder()+
A holder for application-specific credentials
public java.lang.String getClientId()+
the client id of your Spotify application
public void setClientId(java.lang.String p)+
the client id of your Spotify application
public java.lang.String getClientSecret()+
the client secret of your Spotify application
public void setClientSecret(java.lang.String p)+
the client secret of your Spotify application
public java.lang.String getRedirectUri()+
nullable redirect uri (use if you're doing client authentication
public void setRedirectUri(java.lang.String p)+
nullable redirect uri (use if you're doing client authentication
public SpotifyCredentials build()+
public class SpotifyException
+Constructor and Description | +
---|
SpotifyException(java.lang.String message,
+ java.lang.Throwable cause) |
+
public class SpotifyLogger
+Constructor and Description | +
---|
SpotifyLogger(boolean enabled) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+getEnabled() |
+
java.lang.String |
+getOrangeString() |
+
java.lang.String |
+getRedString() |
+
java.lang.String |
+getResetString() |
+
void |
+logError(boolean fatal,
+ java.lang.String message,
+ java.lang.Throwable throwable) |
+
void |
+logInfo(java.lang.String message) |
+
void |
+logWarning(java.lang.String message) |
+
void |
+setEnabled(boolean p) |
+
public java.lang.String getRedString()+
public java.lang.String getOrangeString()+
public java.lang.String getResetString()+
public void logInfo(java.lang.String message)+
public void logWarning(java.lang.String message)+
public void logError(boolean fatal, + java.lang.String message, + java.lang.Throwable throwable)+
public boolean getEnabled()+
public void setEnabled(boolean p)+
public class SpotifyRestAction<T>
+Provides a uniform interface to retrieve, whether synchronously or asynchronously, T from Spotify
Modifier and Type | +Method and Description | +
---|---|
java.util.concurrent.CompletableFuture<T> |
+asFuture()
+Return supplier as a CompletableFuture
+ |
+
T |
+complete()
+Invoke supplier and synchronously retrieve T
+ |
+
SpotifyAPI |
+getApi() |
+
boolean |
+hasCompleted()
+Whether this REST action has been fully completed
+ |
+
boolean |
+hasRun()
+Whether this REST action has been commenced.
+ |
+
SpotifyRestAction<T> |
+queue()
+Invoke supplier asynchronously with no consumer
+ |
+
SpotifyRestAction<T> |
+queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer)
+Invoke supplier asynchronously and consume consumer with the T value returned
+ |
+
SpotifyRestAction<T> |
+queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer,
+ kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> failure)
+Invoke supplier asynchronously and consume consumer with the T value returned
+ |
+
SpotifyRestAction<T> |
+queueAfter(int quantity,
+ java.util.concurrent.TimeUnit timeUnit,
+ kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer)
+Invoke supplier asynchronously immediately and invoke consumer after the specified quantity of time
+ |
+
java.lang.String |
+toString() |
+
public boolean hasRun()+
Whether this REST action has been commenced.
Not to be confused with SpotifyRestAction.hasCompleted
SpotifyRestAction.hasCompleted
public boolean hasCompleted()+
Whether this REST action has been fully completed
public T complete()+
Invoke supplier and synchronously retrieve T
public SpotifyRestAction<T> queue()+
Invoke supplier asynchronously with no consumer
public SpotifyRestAction<T> queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer)+
Invoke supplier asynchronously and consume consumer with the T value returned
consumer
- to be invoked with T after successful completion of supplierpublic SpotifyRestAction<T> queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer, + kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> failure)+
Invoke supplier asynchronously and consume consumer with the T value returned
failure
- Consumer to invoke when an exception is thrown by supplierconsumer
- to be invoked with T after successful completion of supplierpublic java.util.concurrent.CompletableFuture<T> asFuture()+
Return supplier as a CompletableFuture
public SpotifyRestAction<T> queueAfter(int quantity, + java.util.concurrent.TimeUnit timeUnit, + kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer)+
Invoke supplier asynchronously immediately and invoke consumer after the specified quantity of time
quantity
- amount of timetimeUnit
- the unit that quantity is inconsumer
- to be invoked with T after successful completion of supplierpublic java.lang.String toString()+
public SpotifyAPI getApi()+
public class SpotifyRestActionPaging<Z,T extends AbstractPagingObject<Z>>
+extends SpotifyRestAction
+Constructor and Description | +
---|
SpotifyRestActionPaging(SpotifyAPI api,
+ java.util.function.Supplier<T> supplier) |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.sequences.Sequence> |
+getAll()
+Synchronously retrieve all
+class AbstractPagingObject associated with this rest action |
+
SpotifyRestAction<java.util.List> |
+getAllItems()
+Synchronously retrieve all Z associated with this rest action
+ |
+
SpotifyRestAction<kotlin.Unit> |
+streamAllItems(kotlin.jvm.functions.Function1<? super Z,kotlin.Unit> consumer)
+Consume each Z by consumer as it is retrieved
+ |
+
asFuture, complete, getApi, hasCompleted, hasRun, queue, queue, queue, queueAfter, toString
public SpotifyRestActionPaging(SpotifyAPI api, + java.util.function.Supplier<T> supplier)+
public SpotifyRestAction<kotlin.sequences.Sequence> getAll()+
Synchronously retrieve all class AbstractPagingObject
associated with this rest action
class AbstractPagingObject
public SpotifyRestAction<java.util.List> getAllItems()+
Synchronously retrieve all Z associated with this rest action
public SpotifyRestAction<kotlin.Unit> streamAllItems(kotlin.jvm.functions.Function1<? super Z,kotlin.Unit> consumer)+
Consume each Z by consumer as it is retrieved
public enum SpotifyScope
+Scopes provide Spotify users using third-party apps the confidence +that only the information they choose to share will be shared, and nothing more.
Each represents a distinct privilege and may be required by one or more endpoints as discussed +on the Spotify Authorization Documentation
Enum Constant and Description | +
---|
APP_REMOTE_CONTROL
+Remote control playback of Spotify. This scope is currently available to Spotify iOS and Android App Remote SDKs.
+ |
+
PLAYLIST_MODIFY_PRIVATE
+Write access to a user's private playlists.
+ |
+
PLAYLIST_MODIFY_PUBLIC
+Write access to a user's public playlists.
+ |
+
PLAYLIST_READ_COLLABORATIVE
+Include collaborative playlists when requesting a user's playlists.
+ |
+
PLAYLIST_READ_PRIVATE
+Read access to user's private playlists.
+ |
+
STREAMING
+Control playback of a Spotify track. This scope is currently available to Spotify Playback SDKs, including the iOS SDK, Android SDK and Web Playback SDK. The user must have a Spotify Premium account.
+ |
+
UGC_IMAGE_UPLOAD
+Let the application upload playlist covers and profile images
+ |
+
USER_FOLLOW_MODIFY
+Write/delete access to the list of artists and other users that the user follows.
+ |
+
USER_FOLLOW_READ
+Read access to the list of artists and other users that the user follows.
+ |
+
USER_LIBRARY_MODIFY
+Write/delete access to a user's "Your Music" library.
+ |
+
USER_LIBRARY_READ
+Read access to a user's "Your Music" library.
+ |
+
USER_MODIFY_PLAYBACK_STATE
+Write access to a user’s playback state
+ |
+
USER_READ_BIRTHDATE
+Read access to the user's birthdate.
+ |
+
USER_READ_CURRENTLY_PLAYING
+Read access to a user’s currently playing track
+ |
+
USER_READ_EMAIL
+Read access to user’s email address.
+ |
+
USER_READ_PLAYBACK_STATE
+Read access to a user’s player state.
+ |
+
USER_READ_PRIVATE
+Read access to user’s subscription details (type of user account).
+ |
+
USER_READ_RECENTLY_PLAYED
+Read access to a user’s recently played tracks.
+ |
+
USER_TOP_READ
+Read access to a user's top artists and tracks.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getUri()
+The scope id
+ |
+
public static SpotifyScope APP_REMOTE_CONTROL+
Remote control playback of Spotify. This scope is currently available to Spotify iOS and Android App Remote SDKs.
Visible to users: Communicate with the Spotify app on your device.
public static SpotifyScope PLAYLIST_READ_PRIVATE+
Read access to user's private playlists.
Visible to users: Access your private playlists.
public static SpotifyScope PLAYLIST_READ_COLLABORATIVE+
Include collaborative playlists when requesting a user's playlists.
Visible to users: Access your collaborative playlists.
public static SpotifyScope PLAYLIST_MODIFY_PUBLIC+
Write access to a user's public playlists.
Visible to users: Manage your public playlists.
public static SpotifyScope PLAYLIST_MODIFY_PRIVATE+
Write access to a user's private playlists.
Visible to users: Manage your private playlists.
public static SpotifyScope STREAMING+
Control playback of a Spotify track. This scope is currently available to Spotify Playback SDKs, including the iOS SDK, Android SDK and Web Playback SDK. The user must have a Spotify Premium account.
Visible to users: Play music and control playback on your other devices.
public static SpotifyScope UGC_IMAGE_UPLOAD+
Let the application upload playlist covers and profile images
Visible to users: Upload images to personalize your profile or playlist cover
public static SpotifyScope USER_FOLLOW_MODIFY+
Write/delete access to the list of artists and other users that the user follows.
Visible to users: Manage who you are following.
public static SpotifyScope USER_FOLLOW_READ+
Read access to the list of artists and other users that the user follows.
Visible to users: Access your followers and who you are following.
public static SpotifyScope USER_LIBRARY_READ+
Read access to a user's "Your Music" library.
Visible to users: Access your saved tracks and albums.
public static SpotifyScope USER_LIBRARY_MODIFY+
Write/delete access to a user's "Your Music" library.
Visible to users: Manage your saved tracks and albums.
public static SpotifyScope USER_MODIFY_PLAYBACK_STATE+
Write access to a user’s playback state
Visible to users: Control playback on your Spotify clients and Spotify Connect devices.
public static SpotifyScope USER_READ_PRIVATE+
Read access to user’s subscription details (type of user account).
Visible to users: Access your subscription details.
public static SpotifyScope USER_READ_BIRTHDATE+
Read access to the user's birthdate.
Visible to users: Receive your birthdate.
public static SpotifyScope USER_READ_EMAIL+
Read access to user’s email address.
Visible to users: Get your real email address.
public static SpotifyScope USER_TOP_READ+
Read access to a user's top artists and tracks.
Visible to users: Read your top artists and tracks.
public static SpotifyScope USER_READ_PLAYBACK_STATE+
Read access to a user’s player state.
Visible to users: Read your currently playing track and Spotify Connect devices information.
public static SpotifyScope USER_READ_CURRENTLY_PLAYING+
Read access to a user’s currently playing track
Visible to users: Read your currently playing track
public static SpotifyScope USER_READ_RECENTLY_PLAYED+
Read access to a user’s recently played tracks.
Visible to users: Access your recently played items.
public class SpotifyUserAuthorization
+Constructor and Description | +
---|
SpotifyUserAuthorization(java.lang.String authorizationCode,
+ java.lang.String tokenString,
+ Token token) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
Token |
+component3() |
+
SpotifyUserAuthorization |
+copy(java.lang.String authorizationCode,
+ java.lang.String tokenString,
+ Token token) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAuthorizationCode() |
+
Token |
+getToken() |
+
java.lang.String |
+getTokenString() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyUserAuthorization(java.lang.String authorizationCode, + java.lang.String tokenString, + Token token)+
public java.lang.String getAuthorizationCode()+
public java.lang.String getTokenString()+
public Token getToken()+
public java.lang.String component1()+
public java.lang.String component2()+
public Token component3()+
public SpotifyUserAuthorization copy(java.lang.String authorizationCode, + java.lang.String tokenString, + Token token)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyUserAuthorizationBuilder
+Authentication methods
Constructor and Description | +
---|
SpotifyUserAuthorizationBuilder(java.lang.String authorizationCode,
+ java.lang.String tokenString,
+ Token token)
+Authentication methods
+ |
+
SpotifyUserAuthorizationBuilder()
+Authentication methods
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyUserAuthorization |
+build() |
+
java.lang.String |
+getAuthorizationCode()
+Only available when building
+ |
+
Token |
+getToken()
+Build the API using an existing token.
+ |
+
java.lang.String |
+getTokenString()
+Build the API using an existing token
+ |
+
void |
+setAuthorizationCode(java.lang.String p)
+Only available when building
+ |
+
void |
+setToken(Token p)
+Build the API using an existing token.
+ |
+
void |
+setTokenString(java.lang.String p)
+Build the API using an existing token
+ |
+
public SpotifyUserAuthorizationBuilder(java.lang.String authorizationCode, + java.lang.String tokenString, + Token token)+
Authentication methods
authorizationCode
- Only available when building class SpotifyClientAPI
. Spotify auth codetokenString
- Build the API using an existing token (string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes themtoken
- Build the API using an existing token. If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh tokenpublic SpotifyUserAuthorizationBuilder()+
Authentication methods
public SpotifyUserAuthorization build()+
public java.lang.String getAuthorizationCode()+
Only available when building
class SpotifyClientAPI
. Spotify auth code
class SpotifyClientAPI
public void setAuthorizationCode(java.lang.String p)+
Only available when building
class SpotifyClientAPI
. Spotify auth code
p
- Only available when building class SpotifyClientAPI
. Spotify auth codeclass SpotifyClientAPI
public java.lang.String getTokenString()+
Build the API using an existing token
(string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes them
class SpotifyClientAPI
,
+class SpotifyAPI
public void setTokenString(java.lang.String p)+
Build the API using an existing token
(string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes them
p
- Build the API using an existing token (string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes themclass SpotifyClientAPI
,
+class SpotifyAPI
public Token getToken()+
Build the API using an existing token.
If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token
class SpotifyClientAPI
,
+class SpotifyAPI
public void setToken(Token p)+
Build the API using an existing token.
If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token
p
- Build the API using an existing token. If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh tokenclass SpotifyClientAPI
,
+class SpotifyAPI
public class SpotifyUtilities
+Constructor and Description | +
---|
SpotifyUtilities(boolean useCache,
+ java.lang.Integer cacheLimit,
+ boolean automaticRefresh,
+ boolean retryWhenRateLimited,
+ boolean enableLogger,
+ boolean testTokenValidity) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+component1() |
+
java.lang.Integer |
+component2() |
+
boolean |
+component3() |
+
boolean |
+component4() |
+
boolean |
+component5() |
+
boolean |
+component6() |
+
SpotifyUtilities |
+copy(boolean useCache,
+ java.lang.Integer cacheLimit,
+ boolean automaticRefresh,
+ boolean retryWhenRateLimited,
+ boolean enableLogger,
+ boolean testTokenValidity) |
+
boolean |
+equals(java.lang.Object p) |
+
boolean |
+getAutomaticRefresh() |
+
java.lang.Integer |
+getCacheLimit() |
+
boolean |
+getEnableLogger() |
+
boolean |
+getRetryWhenRateLimited() |
+
boolean |
+getTestTokenValidity() |
+
boolean |
+getUseCache() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyUtilities(boolean useCache, + java.lang.Integer cacheLimit, + boolean automaticRefresh, + boolean retryWhenRateLimited, + boolean enableLogger, + boolean testTokenValidity)+
public boolean getUseCache()+
public java.lang.Integer getCacheLimit()+
public boolean getAutomaticRefresh()+
public boolean getRetryWhenRateLimited()+
public boolean getEnableLogger()+
public boolean getTestTokenValidity()+
public boolean component1()+
public java.lang.Integer component2()+
public boolean component3()+
public boolean component4()+
public boolean component5()+
public boolean component6()+
public SpotifyUtilities copy(boolean useCache, + java.lang.Integer cacheLimit, + boolean automaticRefresh, + boolean retryWhenRateLimited, + boolean enableLogger, + boolean testTokenValidity)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyUtilitiesBuilder
+API Utilities
Constructor and Description | +
---|
SpotifyUtilitiesBuilder(boolean useCache,
+ java.lang.Integer cacheLimit,
+ boolean automaticRefresh,
+ boolean retryWhenRateLimited,
+ boolean enableLogger,
+ boolean testTokenValidity,
+ boolean enableAllUtilities)
+API Utilities
+ |
+
SpotifyUtilitiesBuilder()
+API Utilities
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyUtilities |
+build() |
+
boolean |
+getAutomaticRefresh()
+Enable or disable automatic refresh of the Spotify access token
+ |
+
java.lang.Integer |
+getCacheLimit()
+The maximum amount of cached requests allowed at one time.
+ |
+
boolean |
+getEnableAllUtilities()
+Whether to enable all provided utilities
+ |
+
boolean |
+getEnableLogger()
+Set whether to enable to the exception logger
+ |
+
boolean |
+getRetryWhenRateLimited()
+Set whether to block the current thread and wait until the API can retry the request
+ |
+
boolean |
+getTestTokenValidity()
+After API creation,
+ |
+
boolean |
+getUseCache()
+Set whether to cache requests.
+ |
+
void |
+setAutomaticRefresh(boolean p)
+Enable or disable automatic refresh of the Spotify access token
+ |
+
void |
+setCacheLimit(java.lang.Integer p)
+The maximum amount of cached requests allowed at one time.
+ |
+
void |
+setEnableAllUtilities(boolean p)
+Whether to enable all provided utilities
+ |
+
void |
+setEnableLogger(boolean p)
+Set whether to enable to the exception logger
+ |
+
void |
+setRetryWhenRateLimited(boolean p)
+Set whether to block the current thread and wait until the API can retry the request
+ |
+
void |
+setTestTokenValidity(boolean p)
+After API creation,
+ |
+
void |
+setUseCache(boolean p)
+Set whether to cache requests.
+ |
+
public SpotifyUtilitiesBuilder(boolean useCache, + java.lang.Integer cacheLimit, + boolean automaticRefresh, + boolean retryWhenRateLimited, + boolean enableLogger, + boolean testTokenValidity, + boolean enableAllUtilities)+
API Utilities
useCache
- Set whether to cache requests. Default: truecacheLimit
- The maximum amount of cached requests allowed at one time. Null means no limitautomaticRefresh
- Enable or disable automatic refresh of the Spotify access tokenretryWhenRateLimited
- Set whether to block the current thread and wait until the API can retry the requestenableLogger
- Set whether to enable to the exception loggertestTokenValidity
- After API creation, test whether the token is valid by performing a lightweight requestenableAllUtilities
- Whether to enable all provided utilitiespublic SpotifyUtilitiesBuilder()+
API Utilities
public SpotifyUtilities build()+
public boolean getUseCache()+
Set whether to cache requests.
Default: true
public void setUseCache(boolean p)+
Set whether to cache requests.
Default: true
p
- Set whether to cache requests. Default: truepublic java.lang.Integer getCacheLimit()+
The maximum amount of cached requests allowed at one time.
Null means no limit
public void setCacheLimit(java.lang.Integer p)+
The maximum amount of cached requests allowed at one time.
Null means no limit
p
- The maximum amount of cached requests allowed at one time. Null means no limitpublic boolean getAutomaticRefresh()+
Enable or disable automatic refresh of the Spotify access token
public void setAutomaticRefresh(boolean p)+
Enable or disable automatic refresh of the Spotify access token
p
- Enable or disable automatic refresh of the Spotify access tokenpublic boolean getRetryWhenRateLimited()+
Set whether to block the current thread and wait until the API can retry the request
public void setRetryWhenRateLimited(boolean p)+
Set whether to block the current thread and wait until the API can retry the request
p
- Set whether to block the current thread and wait until the API can retry the requestpublic boolean getEnableLogger()+
Set whether to enable to the exception logger
public void setEnableLogger(boolean p)+
Set whether to enable to the exception logger
p
- Set whether to enable to the exception loggerpublic boolean getTestTokenValidity()+
After API creation,
test whether the token is valid by performing a lightweight request
public void setTestTokenValidity(boolean p)+
After API creation,
test whether the token is valid by performing a lightweight request
p
- After API creation, test whether the token is valid by performing a lightweight requestpublic boolean getEnableAllUtilities()+
Whether to enable all provided utilities
public void setEnableAllUtilities(boolean p)+
Whether to enable all provided utilities
p
- Whether to enable all provided utilitiespublic class ClientFollowingAPI
+extends FollowingAPI
+These endpoints allow you manage the artists, users and playlists that a Spotify user follows.
Constructor and Description | +
---|
ClientFollowingAPI(SpotifyAPI api)
+These endpoints allow you manage the artists, users and playlists that a Spotify user follows.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.Unit> |
+followArtist(java.lang.String artistId)
+Add the current user as a follower of an artist
+ |
+
SpotifyRestAction<kotlin.Unit> |
+followArtists(java.lang.String artists)
+Add the current user as a follower of other artists
+ |
+
SpotifyRestAction<kotlin.Unit> |
+followPlaylist(java.lang.String playlist,
+ boolean followPublicly)
+Add the current user as a follower of a playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+followUser(java.lang.String user)
+Add the current user as a follower of another user
+ |
+
SpotifyRestAction<kotlin.Unit> |
+followUsers(java.lang.String users)
+Add the current user as a follower of other users
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.Artist,com.adamratzman.spotify.models.CursorBasedPagingObject> |
+getFollowedArtists(java.lang.Integer limit,
+ java.lang.String after)
+Get the current user’s followed artists.
+ |
+
SpotifyRestAction<java.lang.Boolean> |
+isFollowingArtist(java.lang.String artist)
+Check to see if the current user is following a Spotify artist.
+ |
+
SpotifyRestAction<java.util.List> |
+isFollowingArtists(java.lang.String artists)
+Check to see if the current user is following one or more artists.
+ |
+
SpotifyRestAction<java.lang.Boolean> |
+isFollowingPlaylist(java.lang.String playlistOwner,
+ java.lang.String playlistId)
+Check to see if the current Spotify user is following the specified playlist.
+ |
+
SpotifyRestAction<java.lang.Boolean> |
+isFollowingUser(java.lang.String user)
+Check to see if the current user is following another Spotify user.
+ |
+
SpotifyRestAction<java.util.List> |
+isFollowingUsers(java.lang.String users)
+Check to see if the current user is following one or more other Spotify users.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+unfollowArtist(java.lang.String artist)
+Remove the current user as a follower of an artist
+ |
+
SpotifyRestAction<kotlin.Unit> |
+unfollowArtists(java.lang.String artists)
+Remove the current user as a follower of artists
+ |
+
SpotifyRestAction<kotlin.Unit> |
+unfollowPlaylist(java.lang.String playlist)
+Remove the current user as a follower of a playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+unfollowUser(java.lang.String user)
+Remove the current user as a follower of another user
+ |
+
SpotifyRestAction<kotlin.Unit> |
+unfollowUsers(java.lang.String users)
+Remove the current user as a follower of other users
+ |
+
areFollowingPlaylist, isFollowingPlaylist
getApi, getCache
public ClientFollowingAPI(SpotifyAPI api)+
These endpoints allow you manage the artists, users and playlists that a Spotify user follows.
public SpotifyRestAction<java.lang.Boolean> isFollowingUser(java.lang.String user)+
Check to see if the current user is following another Spotify user.
Requires the SpotifyScope.USER_FOLLOW_READ scope
user
- The user id or uri to check.public SpotifyRestAction<java.lang.Boolean> isFollowingPlaylist(java.lang.String playlistOwner, + java.lang.String playlistId)+
Check to see if the current Spotify user is following the specified playlist.
Checking if the user is privately following a playlist is only possible for the current user when +that user has granted access to the SpotifyScope.PLAYLIST_READ_PRIVATE scope.
playlistOwner
- id or uri of the creator of the playlistplaylistId
- playlist id or uripublic SpotifyRestAction<java.util.List> isFollowingUsers(java.lang.String users)+
Check to see if the current user is following one or more other Spotify users.
Requires the SpotifyScope.USER_FOLLOW_READ scope
users
- List of the user Spotify IDs to check. Max 50public SpotifyRestAction<java.lang.Boolean> isFollowingArtist(java.lang.String artist)+
Check to see if the current user is following a Spotify artist.
Requires the SpotifyScope.USER_FOLLOW_READ scope
artist
- The artist id to check.public SpotifyRestAction<java.util.List> isFollowingArtists(java.lang.String artists)+
Check to see if the current user is following one or more artists.
Requires the SpotifyScope.USER_FOLLOW_READ scope
artists
- List of the artist ids or uris to check. Max 50public SpotifyRestActionPaging<com.adamratzman.spotify.models.Artist,com.adamratzman.spotify.models.CursorBasedPagingObject> getFollowedArtists(java.lang.Integer limit, + java.lang.String after)+
Get the current user’s followed artists.
Requires the SpotifyScope.USER_FOLLOW_READ scope
limit
- The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.after
- The last artist ID retrieved from the previous request.class CursorBasedPagingObject
(Information about them
+with full class Artist
objectspublic SpotifyRestAction<kotlin.Unit> followUser(java.lang.String user)+
Add the current user as a follower of another user
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
public SpotifyRestAction<kotlin.Unit> followUsers(java.lang.String users)+
Add the current user as a follower of other users
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
public SpotifyRestAction<kotlin.Unit> followArtist(java.lang.String artistId)+
Add the current user as a follower of an artist
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
public SpotifyRestAction<kotlin.Unit> followArtists(java.lang.String artists)+
Add the current user as a follower of other artists
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
public SpotifyRestAction<kotlin.Unit> followPlaylist(java.lang.String playlist, + boolean followPublicly)+
Add the current user as a follower of a playlist.
Following a playlist publicly requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +following it privately requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
Note that the scopes you provide determine only whether the current user can themselves follow the playlist +publicly or privately (i.e. show others what they are following), not whether the playlist itself is +public or private.
playlist
- the spotify id or uri of the playlist. Any playlist can be followed, regardless of its
+public/private status, as long as you know its playlist ID.followPublicly
- Defaults to 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.public SpotifyRestAction<kotlin.Unit> unfollowUser(java.lang.String user)+
Remove the current user as a follower of another user
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
user
- The user to be unfollowed frompublic SpotifyRestAction<kotlin.Unit> unfollowUsers(java.lang.String users)+
Remove the current user as a follower of other users
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
users
- The users to be unfollowed frompublic SpotifyRestAction<kotlin.Unit> unfollowArtist(java.lang.String artist)+
Remove the current user as a follower of an artist
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
artist
- The artist to be unfollowed frompublic SpotifyRestAction<kotlin.Unit> unfollowArtists(java.lang.String artists)+
Remove the current user as a follower of artists
Requires the SpotifyScope.USER_FOLLOW_MODIFY scope
artists
- The artists to be unfollowed frompublic SpotifyRestAction<kotlin.Unit> unfollowPlaylist(java.lang.String playlist)+
Remove the current user as a follower of a playlist.
Unfollowing a publicly followed playlist for a user requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +unfollowing a privately followed playlist requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
Note that the scopes you provide relate only to whether the current user is following the playlist publicly or +privately (i.e. showing others what they are following), not whether the playlist itself is public or private.
playlist
- The spotify id or uri of the playlist that is to be no longer followed.public class ClientLibraryAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about, and managing, tracks that the current user has saved in their “Your Music” library.
Constructor and Description | +
---|
ClientLibraryAPI(SpotifyAPI api)
+Endpoints for retrieving information about, and managing, tracks that the current user has saved in their “Your Music” library.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.Unit> |
+add(LibraryType type,
+ java.lang.String id)
+Save one of
+enum LibraryType to the current user’s ‘Your Music’ library. |
+
SpotifyRestAction<kotlin.Unit> |
+add(LibraryType type,
+ java.lang.String ids)
+Save one or more of
+enum LibraryType to the current user’s ‘Your Music’ library. |
+
SpotifyRestAction<java.lang.Boolean> |
+contains(LibraryType type,
+ java.lang.String id)
+Check if the
+enum LibraryType with id id is already saved in the current Spotify user’s ‘Your Music’ library. |
+
SpotifyRestAction<java.util.List> |
+contains(LibraryType type,
+ java.lang.String ids)
+Check if one or more of
+enum LibraryType is already saved in the current Spotify user’s ‘Your Music’ library. |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SavedAlbum,com.adamratzman.spotify.models.PagingObject> |
+getSavedAlbums(java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SavedTrack,com.adamratzman.spotify.models.PagingObject> |
+getSavedTracks(java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+remove(LibraryType type,
+ java.lang.String id)
+Remove one of
+enum LibraryType (track or album) from the current user’s ‘Your Music’ library. |
+
SpotifyRestAction<kotlin.Unit> |
+remove(LibraryType type,
+ java.lang.String ids)
+Remove one or more of the
+enum LibraryType (tracks or albums) from the current user’s ‘Your Music’ library. |
+
getApi, getCache
public ClientLibraryAPI(SpotifyAPI api)+
Endpoints for retrieving information about, and managing, tracks that the current user has saved in their “Your Music” library.
public SpotifyRestActionPaging<com.adamratzman.spotify.models.SavedTrack,com.adamratzman.spotify.models.PagingObject> getSavedTracks(java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get a list of the songs saved in the current Spotify user’s ‘Your Music’ library.
Requires the SpotifyScope.USER_LIBRARY_READ scope
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsmarket
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.class PagingObject
of class SavedTrack
ordered by position in librarypublic SpotifyRestActionPaging<com.adamratzman.spotify.models.SavedAlbum,com.adamratzman.spotify.models.PagingObject> getSavedAlbums(java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
Requires the SpotifyScope.USER_LIBRARY_READ scope
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsmarket
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.class SavedAlbum
ordered by position in librarypublic SpotifyRestAction<java.lang.Boolean> contains(LibraryType type, + java.lang.String id)+
Check if the enum LibraryType
with id id is already saved in the current Spotify user’s ‘Your Music’ library.
Requires the SpotifyScope.USER_LIBRARY_READ scope
type
- The type of object (album or track)id
- The spotify id or uri of the objectenum LibraryType
public SpotifyRestAction<java.util.List> contains(LibraryType type, + java.lang.String ids)+
Check if one or more of enum LibraryType
is already saved in the current Spotify user’s ‘Your Music’ library.
Requires the SpotifyScope.USER_LIBRARY_READ scope
type
- The type of objects (album or track)ids
- The spotify ids or uris of the objectsenum LibraryType
public SpotifyRestAction<kotlin.Unit> add(LibraryType type, + java.lang.String id)+
Save one of enum LibraryType
to the current user’s ‘Your Music’ library.
Requires the SpotifyScope.USER_LIBRARY_MODIFY scope
type
- The type of object (album or track)id
- The spotify id or uri of the objectenum LibraryType
public SpotifyRestAction<kotlin.Unit> add(LibraryType type, + java.lang.String ids)+
Save one or more of enum LibraryType
to the current user’s ‘Your Music’ library.
Requires the SpotifyScope.USER_LIBRARY_MODIFY scope
type
- The type of objects to check against (album or track)ids
- The spotify ids or uris of the objectsenum LibraryType
public SpotifyRestAction<kotlin.Unit> remove(LibraryType type, + java.lang.String id)+
Remove one of enum LibraryType
(track or album) from the current user’s ‘Your Music’ library.
Changes to a user’s saved items may not be visible in other Spotify applications immediately.
Requires the SpotifyScope.USER_LIBRARY_MODIFY scope
type
- The type of object to check against (album or track)id
- The spotify id or uri of the objectenum LibraryType
public SpotifyRestAction<kotlin.Unit> remove(LibraryType type, + java.lang.String ids)+
Remove one or more of the enum LibraryType
(tracks or albums) from the current user’s ‘Your Music’ library.
Changes to a user’s saved items may not be visible in other Spotify applications immediately.
Requires the SpotifyScope.USER_LIBRARY_MODIFY scope
type
- The type of objects to check against (album or track)ids
- The spotify ids or uris of the objectsenum LibraryType
public static enum ClientPersonalizationAPI.TimeRange
+The time frame for which attribute affinities are computed.
Enum Constant and Description | +
---|
LONG_TERM |
+
MEDIUM_TERM |
+
SHORT_TERM |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getId()
+the Spotify id of the time frame
+ |
+
java.lang.String |
+toString() |
+
public static ClientPersonalizationAPI.TimeRange LONG_TERM+
public static ClientPersonalizationAPI.TimeRange MEDIUM_TERM+
public static ClientPersonalizationAPI.TimeRange SHORT_TERM+
public class ClientPersonalizationAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about the user’s listening habits.
Constructor and Description | +
---|
ClientPersonalizationAPI(SpotifyAPI api)
+Endpoints for retrieving information about the user’s listening habits.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestActionPaging<com.adamratzman.spotify.models.Artist,com.adamratzman.spotify.models.PagingObject> |
+getTopArtists(java.lang.Integer limit,
+ java.lang.Integer offset,
+ ClientPersonalizationAPI.TimeRange timeRange)
+Get the current user’s top artists based on calculated affinity.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.Track,com.adamratzman.spotify.models.PagingObject> |
+getTopTracks(java.lang.Integer limit,
+ java.lang.Integer offset,
+ ClientPersonalizationAPI.TimeRange timeRange)
+Get the current user’s top tracks based on calculated affinity.
+ |
+
getApi, getCache
public ClientPersonalizationAPI(SpotifyAPI api)+
Endpoints for retrieving information about the user’s listening habits.
public SpotifyRestActionPaging<com.adamratzman.spotify.models.Artist,com.adamratzman.spotify.models.PagingObject> getTopArtists(java.lang.Integer limit, + java.lang.Integer offset, + ClientPersonalizationAPI.TimeRange timeRange)+
Get the current user’s top artists based on calculated affinity.
Affinity is a measure of the expected preference a 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. As a user’s behavior +is likely to shift over time, this preference data is available over three time spans. See time_range in the +query parameter table for more information. For each time range, the top 50 tracks and artists are available +for each user. In the future, it is likely that this restriction will be relaxed. This data is typically updated +once each day for each user.
Requires the SpotifyScope.USER_TOP_READ scope
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemstimeRange
- The time range to which to compute this. The default is TimeRange.MEDIUM_TERMclass PagingObject
of full class Artist
objects sorted by affinitypublic SpotifyRestActionPaging<com.adamratzman.spotify.models.Track,com.adamratzman.spotify.models.PagingObject> getTopTracks(java.lang.Integer limit, + java.lang.Integer offset, + ClientPersonalizationAPI.TimeRange timeRange)+
Get the current user’s top tracks based on calculated affinity.
Affinity is a measure of the expected preference a 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. As a user’s behavior +is likely to shift over time, this preference data is available over three time spans. See time_range in the +query parameter table for more information. For each time range, the top 50 tracks and artists are available +for each user. In the future, it is likely that this restriction will be relaxed. This data is typically updated +once each day for each user.
Requires the SpotifyScope.USER_TOP_READ scope
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemstimeRange
- The time range to which to compute this. The default is TimeRange.MEDIUM_TERMclass PagingObject
of full class Track
objects sorted by affinitypublic static enum ClientPlayerAPI.PlayerRepeatState
+What state the player can repeat in.
public static ClientPlayerAPI.PlayerRepeatState TRACK+
Repeat the current track
public static ClientPlayerAPI.PlayerRepeatState CONTEXT+
Repeat the current context
public static ClientPlayerAPI.PlayerRepeatState OFF+
Will turn repeat off
public class ClientPlayerAPI
+extends SpotifyEndpoint
+These endpoints allow for viewing and controlling user playback. Please view the official documentation +for more information on how this works. This is in beta and is available for premium users only. Endpoints are not guaranteed to work
Constructor and Description | +
---|
ClientPlayerAPI(SpotifyAPI api)
+These endpoints allow for viewing and controlling user playback. Please view the official documentation
+for more information on how this works. This is in beta and is available for premium users only. Endpoints are not guaranteed to work
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.CurrentlyPlayingContext> |
+getCurrentContext()
+Get information about the user’s current playback state, including track, track progress, and active device.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.CurrentlyPlayingObject> |
+getCurrentlyPlaying()
+Get the object currently being played on the user’s Spotify account.
+ |
+
SpotifyRestAction<java.util.List> |
+getDevices()
+Get information about a user’s available devices.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.PlayHistory,com.adamratzman.spotify.models.CursorBasedPagingObject> |
+getRecentlyPlayed(java.lang.Integer limit,
+ java.lang.String before,
+ java.lang.String after)
+Get tracks from the current user’s recently played tracks.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+pause(java.lang.String deviceId)
+Pause playback on the user’s account.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+resume(java.lang.String deviceId)
+Resumes playback on the current device, if deviceId is not specified.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+seek(long positionMs,
+ java.lang.String deviceId)
+Seeks to the given position in the user’s currently playing track.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+setRepeatMode(ClientPlayerAPI.PlayerRepeatState state,
+ java.lang.String deviceId)
+Set the repeat mode for the user’s playback. Options are repeat-track, repeat-context, and off.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+setVolume(int volume,
+ java.lang.String deviceId)
+Set the volume for the user’s current playback device.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+skipBehind(java.lang.String deviceId)
+Skips to previous track in the user’s queue.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+skipForward(java.lang.String deviceId)
+Skips to the next track in the user’s queue.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+startPlayback(java.lang.String album,
+ java.lang.String artist,
+ PlaylistURI playlist,
+ java.lang.Integer offsetNum,
+ java.lang.String offsetTrackId,
+ java.lang.String deviceId,
+ java.lang.String tracksToPlay)
+Start or resume playback.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+toggleShuffle(boolean shuffle,
+ java.lang.String deviceId)
+Toggle shuffle on or off for user’s playback.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+transferPlayback(java.lang.String[] deviceId,
+ boolean play)
+Transfer playback to a new device and determine if it should start playing.
+ |
+
getApi, getCache
public ClientPlayerAPI(SpotifyAPI api)+
These endpoints allow for viewing and controlling user playback. Please view the official documentation +for more information on how this works. This is in beta and is available for premium users only. Endpoints are not guaranteed to work
public SpotifyRestAction<java.util.List> getDevices()+
Get information about a user’s available devices.
Requires the SpotifyScope.USER_READ_PLAYBACK_STATE scope
public SpotifyRestAction<com.adamratzman.spotify.models.CurrentlyPlayingContext> getCurrentContext()+
Get information about the user’s current playback state, including track, track progress, and active device.
Requires the SpotifyScope.USER_READ_PLAYBACK_STATE scope
public SpotifyRestActionPaging<com.adamratzman.spotify.models.PlayHistory,com.adamratzman.spotify.models.CursorBasedPagingObject> getRecentlyPlayed(java.lang.Integer limit, + java.lang.String before, + java.lang.String after)+
Get tracks from the current user’s recently played tracks.
Requires the SpotifyScope.USER_READ_RECENTLY_PLAYED scope
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.before
- The timestamp (retrieved via cursor) not including, but before which, tracks will have been played. This can be combined with limitafter
- The timestamp (retrieved via cursor) not including, after which, the retrieval starts. This can be combined with limitpublic SpotifyRestAction<com.adamratzman.spotify.models.CurrentlyPlayingObject> getCurrentlyPlaying()+
Get the object currently being played on the user’s Spotify account.
Requires either the SpotifyScope.USER_READ_PLAYBACK_STATE or SpotifyScope.USER_READ_CURRENTLY_PLAYING scopes
public SpotifyRestAction<kotlin.Unit> pause(java.lang.String deviceId)+
Pause playback on the user’s account.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
deviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> seek(long positionMs, + java.lang.String deviceId)+
Seeks to the given position in the user’s currently playing track.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
positionMs
- 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.deviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> setRepeatMode(ClientPlayerAPI.PlayerRepeatState state, + java.lang.String deviceId)+
Set the repeat mode for the user’s playback. Options are repeat-track, repeat-context, and off.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
state
- mode to describe how to repeat in the current contextdeviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> setVolume(int volume, + java.lang.String deviceId)+
Set the volume for the user’s current playback device.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
volume
- The volume to set. Must be a value from 0 to 100 inclusive.deviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> skipForward(java.lang.String deviceId)+
Skips to the next track in the user’s queue.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
deviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> skipBehind(java.lang.String deviceId)+
Skips to previous track in the user’s queue.
Note that 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 ClientPlayerAPI.seek
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
deviceId
- The device to play onClientPlayerAPI.seek
public SpotifyRestAction<kotlin.Unit> startPlayback(java.lang.String album, + java.lang.String artist, + PlaylistURI playlist, + java.lang.Integer offsetNum, + java.lang.String offsetTrackId, + java.lang.String deviceId, + java.lang.String tracksToPlay)+
Start or resume playback.
Note: Only one of the following can be used: album, artist, playlist, or tracksToPlay. Else, you will +not see expected results.
Note also: You can only use one of the following: offsetNum or offsetTrackId
Specify nothing to play to simply resume playback
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
album
- An album id or uri to playartist
- An artist id or uri for whom to playplaylist
- A playlist id or uri from which to playtracksToPlay
- Track ids or uris to play. these are converted into URIs. Max 100offsetNum
- Indicates from where in the context playback should start. Only available with use of album or playlist
+or when tracksToPlay is used.offsetTrackId
- Does the same as offsetNum but with a track id or uri instead of place numberdeviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> resume(java.lang.String deviceId)+
Resumes playback on the current device, if deviceId is not specified.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
deviceId
- The device to play onpublic SpotifyRestAction<kotlin.Unit> toggleShuffle(boolean shuffle, + java.lang.String deviceId)+
Toggle shuffle on or off for user’s playback.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
deviceId
- The device to play onshuffle
- Whether to enable shuffling of playbackpublic SpotifyRestAction<kotlin.Unit> transferPlayback(java.lang.String[] deviceId, + boolean play)+
Transfer playback to a new device and determine if it should start playing.
Requires the SpotifyScope.USER_MODIFY_PLAYBACK_STATE scope
deviceId
- The device to play onplay
- Whether to immediately start playback on the transferred devicepublic static class ClientPlaylistAPI.Snapshot
+Contains the snapshot id, returned from API responses
Constructor and Description | +
---|
Snapshot(java.lang.String snapshotId)
+Contains the snapshot id, returned from API responses
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The playlist state identifier
+ |
+
ClientPlaylistAPI.Snapshot |
+copy(java.lang.String snapshotId)
+Contains the snapshot id, returned from API responses
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getSnapshotId()
+The playlist state identifier
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Snapshot(java.lang.String snapshotId)+
Contains the snapshot id, returned from API responses
snapshotId
- The playlist state identifiersnapshotId
- The playlist state identifierpublic java.lang.String getSnapshotId()+
The playlist state identifier
public java.lang.String component1()+
The playlist state identifier
public ClientPlaylistAPI.Snapshot copy(java.lang.String snapshotId)+
Contains the snapshot id, returned from API responses
snapshotId
- The playlist state identifierpublic java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ClientPlaylistAPI
+extends PlaylistAPI
+Endpoints for retrieving information about a user’s playlists and for managing a user’s playlists.
Modifier and Type | +Class and Description | +
---|---|
static class |
+ClientPlaylistAPI.Snapshot
+Contains the snapshot id, returned from API responses
+ |
+
Constructor and Description | +
---|
ClientPlaylistAPI(SpotifyAPI api)
+Endpoints for retrieving information about a user’s playlists and for managing a user’s playlists.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.Unit> |
+addTrackToPlaylist(java.lang.String playlist,
+ java.lang.String track,
+ java.lang.Integer position)
+Add a track to a user’s playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+addTracksToPlaylist(java.lang.String playlist,
+ java.lang.String[] tracks,
+ java.lang.Integer position)
+Add one or more tracks to a user’s playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+changePlaylistDetails(java.lang.String playlist,
+ java.lang.String name,
+ java.lang.Boolean p,
+ java.lang.Boolean collaborative,
+ java.lang.String description)
+Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.Playlist> |
+createPlaylist(java.lang.String name,
+ java.lang.String description,
+ java.lang.Boolean p,
+ java.lang.Boolean collaborative,
+ java.lang.String user)
+Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)
+ |
+
SpotifyRestAction<kotlin.Unit> |
+deletePlaylist(java.lang.String playlist)
+This method is equivalent to unfollowing a playlist with the given playlist.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.SimplePlaylist> |
+getPlaylist(java.lang.String id)
+Find a client playlist by its id. If you want to find multiple playlists, consider using
+ClientPlaylistAPI.getPlaylists |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> |
+getPlaylists(java.lang.Integer limit,
+ java.lang.Integer offset)
+Get a list of the playlists owned or followed by a Spotify user.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+removeAllPlaylistTracks(java.lang.String playlist)
+Remove all the tracks in a playlist
+ |
+
SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> |
+removeTrackFromPlaylist(java.lang.String playlist,
+ java.lang.String track,
+ SpotifyTrackPositions positions,
+ java.lang.String snapshotId)
+Remove a track in the specified positions (zero-based) from the specified playlist.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> |
+removeTrackFromPlaylist(java.lang.String playlist,
+ java.lang.String track,
+ java.lang.String snapshotId)
+Remove all occurrences of a track from the specified playlist.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> |
+removeTracksFromPlaylist(java.lang.String playlist,
+ java.lang.String[] tracks,
+ java.lang.String snapshotId)
+Remove all occurrences of the specified tracks from the given playlist.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> |
+removeTracksFromPlaylist(java.lang.String playlist,
+ kotlin.Pair[] tracks,
+ java.lang.String snapshotId)
+Remove tracks (each with their own positions) from the given playlist.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> |
+reorderPlaylistTracks(java.lang.String playlist,
+ int reorderRangeStart,
+ java.lang.Integer reorderRangeLength,
+ int insertionPoint,
+ java.lang.String snapshotId)
+Reorder a track or a group of tracks in a playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+replacePlaylistTracks(java.lang.String playlist,
+ java.lang.String tracks)
+Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful
+for replacing tracks, re-ordering existing tracks, or clearing the playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+setPlaylistTracks(java.lang.String playlist,
+ java.lang.String tracks)
+Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful
+for replacing tracks, re-ordering existing tracks, or clearing the playlist.
+ |
+
SpotifyRestAction<kotlin.Unit> |
+uploadPlaylistCover(java.lang.String playlist,
+ java.lang.String imagePath,
+ java.io.File imageFile,
+ java.awt.image.BufferedImage image,
+ java.lang.String imageData,
+ java.lang.String imageUrl)
+Replace the image used to represent a specific playlist. Image type must be jpeg.
+ |
+
getPlaylist, getPlaylistCovers, getPlaylistTracks, getPlaylists
getApi, getCache
public ClientPlaylistAPI(SpotifyAPI api)+
Endpoints for retrieving information about a user’s playlists and for managing a user’s playlists.
public SpotifyRestAction<com.adamratzman.spotify.models.Playlist> createPlaylist(java.lang.String name, + java.lang.String description, + java.lang.Boolean p, + java.lang.Boolean collaborative, + java.lang.String user)+
Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)
Creating a public playlist for a user requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +creating a private playlist requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
user
- The user’s Spotify user ID.name
- The name for the new playlist, for example "Your Coolest Playlist" . This name does not need to be
+unique; a user may have several playlists with the same name.description
- collaborative
- Defaults to false . If true the playlist will be collaborative. Note that to create a
+collaborative playlist you must also set public to false . To create collaborative playlists you must have
+granted SpotifyScope.PLAYLIST_MODIFY_PRIVATE and SpotifyScope.PLAYLIST_MODIFY_PUBLIC scopes.class Playlist
object with no trackspublic SpotifyRestAction<kotlin.Unit> addTrackToPlaylist(java.lang.String playlist, + java.lang.String track, + java.lang.Integer position)+
Add a track to a user’s playlist.
Adding tracks to the current user’s public playlists requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +adding tracks to the current user’s private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The spotify id or uri for the playlist.track
- Track id or uriposition
- The position to insert the tracks, a zero-based index. For example, to insert the tracks in the
+first position: position=0; to insert the tracks in the third position: position=2. If omitted, the tracks will
+be appended to the playlist. Tracks are added in the order they are listed in the query string or request body.public SpotifyRestAction<kotlin.Unit> addTracksToPlaylist(java.lang.String playlist, + java.lang.String[] tracks, + java.lang.Integer position)+
Add one or more tracks to a user’s playlist.
Adding tracks to the current user’s public playlists requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +adding tracks to the current user’s private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The spotify id or uri for the playlist.tracks
- Spotify track ids. A maximum of 100 tracks can be added in one request.position
- The position to insert the tracks, a zero-based index. For example, to insert the tracks in the
+first position: position=0; to insert the tracks in the third position: position=2. If omitted, the tracks will
+be appended to the playlist. Tracks are added in the order they are listed in the query string or request body.public SpotifyRestAction<kotlin.Unit> changePlaylistDetails(java.lang.String playlist, + java.lang.String name, + java.lang.Boolean p, + java.lang.Boolean collaborative, + java.lang.String description)+
Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)
Modifying a public playlist requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +modifying a private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The spotify id or uri for the playlist.name
- Optional. The name to change the playlist to.collaborative
- Optional. Whether to make the playlist collaborative or not.description
- Optional. Whether to change the description or not.public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> getPlaylists(java.lang.Integer limit, + java.lang.Integer offset)+
Get a list of the playlists owned or followed by a Spotify user.
Private playlists are only retrievable for the current user and requires the SpotifyScope.PLAYLIST_READ_PRIVATE scope +to have been authorized by the user. Note that this scope alone will not return collaborative playlists, even +though they are always private. +Collaborative playlists are only retrievable for the current user and requires the SpotifyScope.PLAYLIST_READ_COLLABORATIVE +scope to have been authorized by the user.
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemspublic SpotifyRestAction<com.adamratzman.spotify.models.SimplePlaylist> getPlaylist(java.lang.String id)+
Find a client playlist by its id. If you want to find multiple playlists, consider using ClientPlaylistAPI.getPlaylists
Note that private playlists are only retrievable for the current user and require the SpotifyScope.PLAYLIST_READ_PRIVATE scope +to have been authorized by the user. Note that this scope alone will not return a collaborative playlist, even +though they are always private. +Collaborative playlists are only retrievable for the current user and require the SpotifyScope.PLAYLIST_READ_COLLABORATIVE +scope to have been authorized by the user.
id
- Playlist id or uriclass SimplePlaylist
if the playlist doesn't existClientPlaylistAPI.getPlaylists
public SpotifyRestAction<kotlin.Unit> deletePlaylist(java.lang.String playlist)+
This method is equivalent to unfollowing a playlist with the given playlist.
Unfortunately, Spotify does not allow deletion of playlists themselves
playlist
- playlist idpublic SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> reorderPlaylistTracks(java.lang.String playlist, + int reorderRangeStart, + java.lang.Integer reorderRangeLength, + int insertionPoint, + java.lang.String snapshotId)+
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.
Reordering tracks in the current user’s public playlists requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +reordering tracks in the current user’s private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The spotify id or uri for the playlist.reorderRangeStart
- The position of the first track to be reordered.reorderRangeLength
- The amount of tracks to be reordered. Defaults to 1 if not set.
+The range of tracks to be reordered begins from the range_start position, and includes the range_length subsequent tracks.
+Example: To move the tracks at index 9-10 to the start of the playlist, range_start is set to 9, and range_length is set to 2.insertionPoint
- 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.snapshotId
- the playlist snapshot against which to apply this action. recommended to havepublic SpotifyRestAction<kotlin.Unit> setPlaylistTracks(java.lang.String playlist, + java.lang.String tracks)+
Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful +for replacing tracks, re-ordering existing tracks, or clearing the playlist.
Setting tracks in the current user’s public playlists requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +setting tracks in the current user’s private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The spotify id or uri for the playlist.tracks
- The Spotify track ids.public SpotifyRestAction<kotlin.Unit> replacePlaylistTracks(java.lang.String playlist, + java.lang.String tracks)+
Replace all the tracks in a playlist, overwriting its existing tracks. This powerful request can be useful +for replacing tracks, re-ordering existing tracks, or clearing the playlist.
Setting tracks in the current user’s public playlists requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +setting tracks in the current user’s private playlist (including collaborative playlists) requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The spotify id or uri for the playlist.tracks
- The Spotify track ids.public SpotifyRestAction<kotlin.Unit> removeAllPlaylistTracks(java.lang.String playlist)+
Remove all the tracks in a playlist
playlist
- the spotify id or uri for the playlist.public SpotifyRestAction<kotlin.Unit> uploadPlaylistCover(java.lang.String playlist, + java.lang.String imagePath, + java.io.File imageFile, + java.awt.image.BufferedImage image, + java.lang.String imageData, + java.lang.String imageUrl)+
Replace the image used to represent a specific playlist. Image type must be jpeg.
You must specify a JPEG image path or image data, maximum payload size is 256 KB
Required conditions: This access token must be tied to the user who owns the playlist, and must have the +scope ugc-image-upload granted. In addition, the token must also +contain playlist-modify-public and/or +playlist-modify-private, depending on the +public status of the playlist you want to update.
playlist
- the spotify id or uri for the playlist.imagePath
- Optionally specify the full local path to the imageimageUrl
- Optionally specify a URL to the imageimageFile
- Optionally specify the image Fileimage
- Optionally specify the image's BufferedImage objectimageData
- Optionally specify the Base64-encoded image data yourselfpublic SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> removeTrackFromPlaylist(java.lang.String playlist, + java.lang.String track, + SpotifyTrackPositions positions, + java.lang.String snapshotId)+
Remove a track in the specified positions (zero-based) from the specified playlist.
Removing tracks from a user’s public playlist requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +removing tracks from a private playlist requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The playlist idtrack
- The track idpositions
- The positions at which the track is located in the playlistsnapshotId
- The playlist snapshot against which to apply this action. recommended to havepublic SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> removeTrackFromPlaylist(java.lang.String playlist, + java.lang.String track, + java.lang.String snapshotId)+
Remove all occurrences of a track from the specified playlist.
Removing tracks from a user’s public playlist requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +removing tracks from a private playlist requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The playlist idtrack
- The track idsnapshotId
- The playlist snapshot against which to apply this action. recommended to havepublic SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> removeTracksFromPlaylist(java.lang.String playlist, + java.lang.String[] tracks, + java.lang.String snapshotId)+
Remove all occurrences of the specified tracks from the given playlist.
Removing tracks from a user’s public playlist requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +removing tracks from a private playlist requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The playlist idtracks
- An array of track idssnapshotId
- The playlist snapshot against which to apply this action. recommended to havepublic SpotifyRestAction<com.adamratzman.spotify.endpoints.client.ClientPlaylistAPI.Snapshot> removeTracksFromPlaylist(java.lang.String playlist, + kotlin.Pair[] tracks, + java.lang.String snapshotId)+
Remove tracks (each with their own positions) from the given playlist.
Removing tracks from a user’s public playlist requires authorization of the SpotifyScope.PLAYLIST_MODIFY_PUBLIC scope; +removing tracks from a private playlist requires the SpotifyScope.PLAYLIST_MODIFY_PRIVATE scope.
playlist
- The playlist idtracks
- An array of Pairs of track ids and track positions (zero-based)snapshotId
- The playlist snapshot against which to apply this action. recommended to havepublic class ClientUserAPI
+extends UserAPI
+Endpoints for retrieving information about a user’s profile.
Constructor and Description | +
---|
ClientUserAPI(SpotifyAPI api)
+Endpoints for retrieving information about a user’s profile.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.SpotifyUserInformation> |
+getUserProfile()
+Get detailed profile information about the current user (including the current user’s username).
+ |
+
getProfile
getApi, getCache
public ClientUserAPI(SpotifyAPI api)+
Endpoints for retrieving information about a user’s profile.
public SpotifyRestAction<com.adamratzman.spotify.models.SpotifyUserInformation> getUserProfile()+
Get detailed profile information about the current user (including the current user’s username).
The access token must have been issued on behalf of the current user. +Reading the user’s email address requires the SpotifyScope.USER_READ_EMAIL scope; +reading country and product subscription level requires the SpotifyScope.USER_READ_PRIVATE scope. +Reading the user’s birthdate requires the SpotifyScope.USER_READ_BIRTHDATE scope.
class SpotifyUserInformation
object with possibly-null country, email, subscription and birthday fieldspublic enum LibraryType
+Type of object in a user's Spotify library
Enum Constant and Description | +
---|
ALBUM |
+
TRACK |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+toString() |
+
public static LibraryType TRACK+
public static LibraryType ALBUM+
public class SpotifyTrackPositions
+Represents the positions inside a playlist's items list of where to locate the track
Constructor and Description | +
---|
SpotifyTrackPositions(int positions)
+Represents the positions inside a playlist's items list of where to locate the track
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int[] |
+getPositions()
+Track positions
+ |
+
Class | +Description | +
---|---|
ClientFollowingAPI | +
+ These endpoints allow you manage the artists, users and playlists that a Spotify user follows.
+ |
+
ClientLibraryAPI | +
+ Endpoints for retrieving information about, and managing, tracks that the current user has saved in their “Your Music” library.
+ |
+
ClientPersonalizationAPI | +
+ Endpoints for retrieving information about the user’s listening habits.
+ |
+
ClientPlayerAPI | +
+ These endpoints allow for viewing and controlling user playback. Please view the official documentation
+for more information on how this works. This is in beta and is available for premium users only. Endpoints are not guaranteed to work
+ |
+
ClientPlaylistAPI | +
+ Endpoints for retrieving information about a user’s playlists and for managing a user’s playlists.
+ |
+
ClientUserAPI | +
+ Endpoints for retrieving information about a user’s profile.
+ |
+
SpotifyTrackPositions | +
+ Represents the positions inside a playlist's items list of where to locate the track
+ |
+
Enum | +Description | +
---|---|
LibraryType | +
+ Type of object in a user's Spotify library
+ |
+
public class AlbumAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about one or more albums from the Spotify catalog.
Constructor and Description | +
---|
AlbumAPI(SpotifyAPI api)
+Endpoints for retrieving information about one or more albums from the Spotify catalog.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.Album> |
+getAlbum(java.lang.String album,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify catalog information for a single album.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleTrack,com.adamratzman.spotify.models.PagingObject> |
+getAlbumTracks(java.lang.String album,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.
+ |
+
SpotifyRestAction<java.util.List> |
+getAlbums(java.lang.String[] albums,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify catalog information for multiple albums identified by their Spotify IDs.
+Albums not found are returned as null inside the ordered list
+ |
+
getApi, getCache
public AlbumAPI(SpotifyAPI api)+
Endpoints for retrieving information about one or more albums from the Spotify catalog.
public SpotifyRestAction<com.adamratzman.spotify.models.Album> getAlbum(java.lang.String album, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify catalog information for a single album.
album
- The spotify id or uri for the album.market
- Provide this parameter if you want to apply Track Relinkingclass Album
object if the provided id is found, otherwise nullpublic SpotifyRestAction<java.util.List> getAlbums(java.lang.String[] albums, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify catalog information for multiple albums identified by their Spotify IDs. +Albums not found are returned as null inside the ordered list
albums
- The spotify ids or uris for the albums.market
- Provide this parameter if you want to apply Track Relinkingclass Album
objects or null if the album could not be found, in the order requestedpublic SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleTrack,com.adamratzman.spotify.models.PagingObject> getAlbumTracks(java.lang.String album, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.
album
- The spotify id or uri for the album.limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsmarket
- Provide this parameter if you want to apply Track Relinkingclass PagingObject
of class SimpleTrack
objectspublic static enum ArtistsAPI.AlbumInclusionStrategy
+Describes object types to include when finding albums
Enum Constant and Description | +
---|
ALBUM |
+
APPEARS_ON |
+
COMPILATION |
+
SINGLE |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getKeyword()
+The spotify id of the strategy
+ |
+
public static ArtistsAPI.AlbumInclusionStrategy ALBUM+
public static ArtistsAPI.AlbumInclusionStrategy SINGLE+
public static ArtistsAPI.AlbumInclusionStrategy APPEARS_ON+
public static ArtistsAPI.AlbumInclusionStrategy COMPILATION+
public class ArtistsAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about one or more artists from the Spotify catalog.
Constructor and Description | +
---|
ArtistsAPI(SpotifyAPI api)
+Endpoints for retrieving information about one or more artists from the Spotify catalog.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.Artist> |
+getArtist(java.lang.String artist)
+Get Spotify catalog information for a single artist identified by their unique Spotify ID.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleAlbum,com.adamratzman.spotify.models.PagingObject> |
+getArtistAlbums(java.lang.String artist,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market,
+ com.adamratzman.spotify.endpoints.public.ArtistsAPI.AlbumInclusionStrategy include)
+Get Spotify catalog information about an artist’s albums.
+ |
+
SpotifyRestAction<java.util.List> |
+getArtistTopTracks(java.lang.String artist,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify catalog information about an artist’s top tracks by country.
+ |
+
SpotifyRestAction<java.util.List> |
+getArtists(java.lang.String artists)
+Get Spotify catalog information for several artists based on their Spotify IDs. Artists not found are returned as null inside the ordered list
+ |
+
SpotifyRestAction<java.util.List> |
+getRelatedArtists(java.lang.String artist)
+Get Spotify catalog information about artists similar to a given artist.
+Similarity is based on analysis of the Spotify community’s listening history.
+ |
+
getApi, getCache
public ArtistsAPI(SpotifyAPI api)+
Endpoints for retrieving information about one or more artists from the Spotify catalog.
public SpotifyRestAction<com.adamratzman.spotify.models.Artist> getArtist(java.lang.String artist)+
Get Spotify catalog information for a single artist identified by their unique Spotify ID.
artist
- The spotify id or uri for the artist.class Artist
if valid artist id is provided, otherwise nullpublic SpotifyRestAction<java.util.List> getArtists(java.lang.String artists)+
Get Spotify catalog information for several artists based on their Spotify IDs. Artists not found are returned as null inside the ordered list
artists
- The spotify ids or uris representing the artists.class Artist
objects or null if the artist could not be found, in the order requestedpublic SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleAlbum,com.adamratzman.spotify.models.PagingObject> getArtistAlbums(java.lang.String artist, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market, + com.adamratzman.spotify.endpoints.public.ArtistsAPI.AlbumInclusionStrategy include)+
Get Spotify catalog information about an artist’s albums.
artist
- The artist id or urimarket
- Supply this parameter to limit the response to one particular geographical market.limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsinclude
- List of keywords that will be used to filter the response. If not supplied, all album groups will be returned.class PagingObject
of class SimpleAlbum
objectspublic SpotifyRestAction<java.util.List> getArtistTopTracks(java.lang.String artist, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify catalog information about an artist’s top tracks by country.
Contains only up to 10 tracks with no class CursorBasedPagingObject
to go between top track pages. Thus, only the top
+10 are exposed
artist
- The spotify id or uri for the artist.market
- The country (Market) to search. Unlike endpoints with optional Track Relinking, the Market is not optional.class Track
s of an artist in the given marketclass CursorBasedPagingObject
public SpotifyRestAction<java.util.List> getRelatedArtists(java.lang.String artist)+
Get Spotify catalog information about artists similar to a given artist. +Similarity is based on analysis of the Spotify community’s listening history.
artist
- The spotify id or uri for the artist.class Artist
s representing similar artistspublic class BrowseAPI
+extends SpotifyEndpoint
+Endpoints for getting playlists and new album releases featured on Spotify’s Browse tab.
Constructor and Description | +
---|
BrowseAPI(SpotifyAPI api)
+Endpoints for getting playlists and new album releases featured on Spotify’s Browse tab.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<java.util.List> |
+getAvailableGenreSeeds()
+Retrieve a list of available genres seed parameter values for recommendations.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.SpotifyCategory> |
+getCategory(java.lang.String categoryId,
+ com.neovisionaries.i18n.CountryCode market,
+ java.lang.String locale)
+Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SpotifyCategory,com.adamratzman.spotify.models.PagingObject> |
+getCategoryList(java.lang.Integer limit,
+ java.lang.Integer offset,
+ java.lang.String locale,
+ com.neovisionaries.i18n.CountryCode market)
+Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.FeaturedPlaylists> |
+getFeaturedPlaylists(java.lang.Integer limit,
+ java.lang.Integer offset,
+ java.lang.String locale,
+ com.neovisionaries.i18n.CountryCode market,
+ java.lang.Long timestamp)
+Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleAlbum,com.adamratzman.spotify.models.PagingObject> |
+getNewReleases(java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> |
+getPlaylistsForCategory(java.lang.String categoryId,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get a list of Spotify playlists tagged with a particular category.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.RecommendationResponse> |
+getRecommendations(java.util.List<java.lang.String> seedArtists,
+ java.util.List<java.lang.String> seedGenres,
+ java.util.List<java.lang.String> seedTracks,
+ java.lang.Integer limit,
+ com.neovisionaries.i18n.CountryCode market,
+ java.util.Map<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute,? extends java.lang.Number> targetAttributes,
+ java.util.Map<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute,? extends java.lang.Number> minAttributes,
+ java.util.Map<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute,? extends java.lang.Number> maxAttributes)
+Deprecated.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.RecommendationResponse> |
+getTrackRecommendations(java.util.List<java.lang.String> seedArtists,
+ java.util.List<java.lang.String> seedGenres,
+ java.util.List<java.lang.String> seedTracks,
+ java.lang.Integer limit,
+ com.neovisionaries.i18n.CountryCode market,
+ java.util.List<? extends com.adamratzman.spotify.endpoints.public.TrackAttribute<?>> targetAttributes,
+ java.util.List<? extends com.adamratzman.spotify.endpoints.public.TrackAttribute<?>> minAttributes,
+ java.util.List<? extends com.adamratzman.spotify.endpoints.public.TrackAttribute<?>> maxAttributes)
+Create a playlist-style listening experience based on seed artists, tracks and genres.
+Recommendations are generated based on the available information for a given seed entity and matched against similar
+artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned
+together with pool size details. For artists and tracks that are very new or obscure there might not be enough data
+to generate a list of tracks.
+ |
+
getApi, getCache
public BrowseAPI(SpotifyAPI api)+
Endpoints for getting playlists and new album releases featured on Spotify’s Browse tab.
public SpotifyRestAction<java.util.List> getAvailableGenreSeeds()+
Retrieve a list of available genres seed parameter values for recommendations.
public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleAlbum,com.adamratzman.spotify.models.PagingObject> getNewReleases(java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsmarket
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.class PagingObject
of new album released, ordered by release date (descending)public SpotifyRestAction<com.adamratzman.spotify.models.FeaturedPlaylists> getFeaturedPlaylists(java.lang.Integer limit, + java.lang.Integer offset, + java.lang.String locale, + com.neovisionaries.i18n.CountryCode market, + java.lang.Long timestamp)+
Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemslocale
- The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”.
+Provide this parameter if you want the results returned in a particular language (where available).
+Note that, if locale is not supplied, or if the specified language is not available,
+all strings will be returned in the Spotify default language (American English. The locale parameter, combined with the country parameter, may give odd results if not carefully matched.
+For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings.market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.timestamp
- Use this parameter (time in milliseconds) to specify the user’s local time to get results tailored for that specific
+date and time in the day. If not provided, the response defaults to the current UTC time.class FeaturedPlaylists
object with the current featured message and featured playlistspublic SpotifyRestActionPaging<com.adamratzman.spotify.models.SpotifyCategory,com.adamratzman.spotify.models.PagingObject> getCategoryList(java.lang.Integer limit, + java.lang.Integer offset, + java.lang.String locale, + com.neovisionaries.i18n.CountryCode market)+
Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemslocale
- The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”.
+Provide this parameter if you want the results returned in a particular language (where available).
+Note that, if locale is not supplied, or if the specified language is not available,
+all strings will be returned in the Spotify default language (American English. The locale parameter, combined with the country parameter, may give odd results if not carefully matched.
+For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings.market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.public SpotifyRestAction<com.adamratzman.spotify.models.SpotifyCategory> getCategory(java.lang.String categoryId, + com.neovisionaries.i18n.CountryCode market, + java.lang.String locale)+
Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).
locale
- The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning “Spanish (Mexico)”.
+Provide this parameter if you want the results returned in a particular language (where available).
+Note that, if locale is not supplied, or if the specified language is not available,
+all strings will be returned in the Spotify default language (American English. The locale parameter, combined with the country parameter, may give odd results if not carefully matched.
+For example country=SE&locale=de_DE will return a list of categories relevant to Sweden but as German language strings.market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> getPlaylistsForCategory(java.lang.String categoryId, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get a list of Spotify playlists tagged with a particular category.
market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of top playlists tagged with categoryIdpublic SpotifyRestAction<com.adamratzman.spotify.models.RecommendationResponse> getTrackRecommendations(java.util.List<java.lang.String> seedArtists, + java.util.List<java.lang.String> seedGenres, + java.util.List<java.lang.String> seedTracks, + java.lang.Integer limit, + com.neovisionaries.i18n.CountryCode market, + java.util.List<? extends com.adamratzman.spotify.endpoints.public.TrackAttribute<?>> targetAttributes, + java.util.List<? extends com.adamratzman.spotify.endpoints.public.TrackAttribute<?>> minAttributes, + java.util.List<? extends com.adamratzman.spotify.endpoints.public.TrackAttribute<?>> maxAttributes)+
Create a playlist-style listening experience based on seed artists, tracks and genres. +Recommendations are generated based on the available information for a given seed entity and matched against similar +artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned +together with pool size details. For artists and tracks that are very new or obscure there might not be enough data +to generate a list of tracks.
5 seeds of any combination of seedArtists, seedGenres, and seedTracks can be provided. AT LEAST 1 seed must be provided.
All attributes are weighted equally.
See here for a list +and descriptions of tuneable track attributes and their ranges.
seedArtists
- A possibly null provided list of Artist IDs to be used to generate recommendationsseedGenres
- A possibly null provided list of Genre IDs to be used to generate recommendations. Invalid genres are ignoredseedTracks
- A possibly null provided list of Track IDs to be used to generate recommendationslimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.targetAttributes
- For each of the tunable track attributes a target value may be provided.
+Tracks with the attribute values nearest to the target values will be preferred.minAttributes
- For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided.maxAttributes
- For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided.
+For example, setting max instrumentalness equal to 0.35 would filter out most tracks that are likely to be instrumental.class RecommendationResponse
with class RecommendationSeed
s used and class SimpleTrack
s foundpublic SpotifyRestAction<com.adamratzman.spotify.models.RecommendationResponse> getRecommendations(java.util.List<java.lang.String> seedArtists, + java.util.List<java.lang.String> seedGenres, + java.util.List<java.lang.String> seedTracks, + java.lang.Integer limit, + com.neovisionaries.i18n.CountryCode market, + java.util.Map<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute,? extends java.lang.Number> targetAttributes, + java.util.Map<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute,? extends java.lang.Number> minAttributes, + java.util.Map<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute,? extends java.lang.Number> maxAttributes)+
Create a playlist-style listening experience based on seed artists, tracks and genres. +Recommendations are generated based on the available information for a given seed entity and matched against similar +artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned +together with pool size details. For artists and tracks that are very new or obscure there might not be enough data +to generate a list of tracks.
5 seeds of any combination of seedArtists, seedGenres, and seedTracks can be provided. AT LEAST 1 seed must be provided.
All attributes are weighted equally.
See here for a list +and descriptions of tuneable track attributes and their ranges.
seedArtists
- A possibly null provided list of Artist IDs to be used to generate recommendationsseedGenres
- A possibly null provided list of Genre IDs to be used to generate recommendations. Invalid genres are ignoredseedTracks
- A possibly null provided list of Track IDs to be used to generate recommendationslimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.
+If omitted, the returned items will be relevant to all countries.targetAttributes
- For each of the tunable track attributes a target value may be provided.
+Tracks with the attribute values nearest to the target values will be preferred.minAttributes
- For each tunable track attribute, a hard floor on the selected track attribute’s value can be provided.maxAttributes
- For each tunable track attribute, a hard ceiling on the selected track attribute’s value can be provided.
+For example, setting max instrumentalness equal to 0.35 would filter out most tracks that are likely to be instrumental.class RecommendationResponse
with class RecommendationSeed
s used and class SimpleTrack
s foundpublic class FollowingAPI
+extends SpotifyEndpoint
+This endpoint allow you check the playlists that a Spotify user follows.
Constructor and Description | +
---|
FollowingAPI(SpotifyAPI api)
+This endpoint allow you check the playlists that a Spotify user follows.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<java.util.List> |
+areFollowingPlaylist(java.lang.String playlistOwner,
+ java.lang.String playlist,
+ java.lang.String users)
+Check to see if one or more Spotify users are following a specified playlist.
+ |
+
SpotifyRestAction<java.lang.Boolean> |
+isFollowingPlaylist(java.lang.String playlistOwner,
+ java.lang.String playlist,
+ java.lang.String user)
+Check to see if a specific Spotify user is following the specified playlist.
+ |
+
getApi, getCache
public FollowingAPI(SpotifyAPI api)+
This endpoint allow you check the playlists that a Spotify user follows.
public SpotifyRestAction<java.util.List> areFollowingPlaylist(java.lang.String playlistOwner, + java.lang.String playlist, + java.lang.String users)+
Check to see if one or more Spotify users are following a specified playlist.
playlistOwner
- id or uri of the creator of the playlistplaylist
- playlist id or uriusers
- user ids or uris to checkpublic SpotifyRestAction<java.lang.Boolean> isFollowingPlaylist(java.lang.String playlistOwner, + java.lang.String playlist, + java.lang.String user)+
Check to see if a specific Spotify user is following the specified playlist.
playlistOwner
- id or uri of the creator of the playlistplaylist
- playlist id or uriuser
- Spotify user idpublic class PlaylistAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about a user’s playlists
Constructor and Description | +
---|
PlaylistAPI(SpotifyAPI api)
+Endpoints for retrieving information about a user’s playlists
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.Playlist> |
+getPlaylist(java.lang.String playlist,
+ com.neovisionaries.i18n.CountryCode market)
+Get a playlist owned by a Spotify user.
+ |
+
SpotifyRestAction<java.util.List> |
+getPlaylistCovers(java.lang.String playlist)
+Get the current image(s) associated with a specific playlist.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.PlaylistTrack,com.adamratzman.spotify.models.PagingObject> |
+getPlaylistTracks(java.lang.String playlist,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get full details of the tracks of a playlist owned by a Spotify user.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> |
+getPlaylists(java.lang.String user,
+ java.lang.Integer limit,
+ java.lang.Integer offset)
+Get a list of the playlists owned or followed by a Spotify user. Lookups for non-existant users return an empty
+
+class PagingObject (blame Spotify) |
+
getApi, getCache
public PlaylistAPI(SpotifyAPI api)+
Endpoints for retrieving information about a user’s playlists
public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> getPlaylists(java.lang.String user, + java.lang.Integer limit, + java.lang.Integer offset)+
Get a list of the playlists owned or followed by a Spotify user. Lookups for non-existant users return an empty
+class PagingObject
(blame Spotify)
Note that private playlists are only retrievable for the current user and require the SpotifyScope.PLAYLIST_READ_PRIVATE scope +to have been authorized by the user. Note that this scope alone will not return a collaborative playlist, even +though they are always private. +Collaborative playlists are only retrievable for the current user and require the SpotifyScope.PLAYLIST_READ_COLLABORATIVE +scope to have been authorized by the user.
user
- The user’s Spotify user ID.limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of class SimplePlaylist
s ONLY if the user can be found. Otherwise, an empty paging object is returned.
+This does not have the detail of full class Playlist
objects.class PagingObject
public SpotifyRestAction<com.adamratzman.spotify.models.Playlist> getPlaylist(java.lang.String playlist, + com.neovisionaries.i18n.CountryCode market)+
Get a playlist owned by a Spotify user.
Note that both Public and Private playlists belonging to any user are retrievable on provision of a valid access token.
playlist
- The spotify id or uri for the playlist.market
- Provide this parameter if you want to apply Track Relinkingpublic SpotifyRestActionPaging<com.adamratzman.spotify.models.PlaylistTrack,com.adamratzman.spotify.models.PagingObject> getPlaylistTracks(java.lang.String playlist, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get full details of the tracks of a playlist owned by a Spotify user.
Note that both Public and Private playlists belonging to any user are retrievable on provision of a valid access token.
playlist
- The spotify id or uri for the playlist.market
- Provide this parameter if you want to apply Track Relinkinglimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemspublic SpotifyRestAction<java.util.List> getPlaylistCovers(java.lang.String playlist)+
Get the current image(s) associated with a specific playlist.
This access token must be issued on behalf of the user. Current playlist image for both Public and Private +playlists of any user are retrievable on provision of a valid access token.
playlist
- The spotify id or uri for the playlist.public class PlaylistsAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about a user’s playlists
Constructor and Description | +
---|
PlaylistsAPI(SpotifyAPI api)
+Endpoints for retrieving information about a user’s playlists
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.Playlist> |
+getPlaylist(java.lang.String playlist,
+ com.neovisionaries.i18n.CountryCode market)
+Get a playlist owned by a Spotify user.
+ |
+
SpotifyRestAction<java.util.List> |
+getPlaylistCovers(java.lang.String playlist)
+Get the current image associated with a specific playlist.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.PlaylistTrack,com.adamratzman.spotify.models.PagingObject> |
+getPlaylistTracks(java.lang.String playlist,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get full details of the tracks of a playlist owned by a Spotify user.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> |
+getPlaylists(java.lang.String user,
+ java.lang.Integer limit,
+ java.lang.Integer offset)
+Get a list of the playlists owned or followed by a Spotify user. Lookups for non-existant users return empty
+class PagingObject s
+(blame Spotify) |
+
getApi
public PlaylistsAPI(SpotifyAPI api)+
Endpoints for retrieving information about a user’s playlists
public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> getPlaylists(java.lang.String user, + java.lang.Integer limit, + java.lang.Integer offset)+
Get a list of the playlists owned or followed by a Spotify user. Lookups for non-existant users return empty class PagingObject
s
+(blame Spotify)
user
- The user’s Spotify user ID.limit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of class SimplePlaylist
s ONLY if the user can be found. Otherwise, an empty paging object is returned.
+This does not have the detail of full class Playlist
objects.class PagingObject
public SpotifyRestAction<com.adamratzman.spotify.models.Playlist> getPlaylist(java.lang.String playlist, + com.neovisionaries.i18n.CountryCode market)+
Get a playlist owned by a Spotify user.
playlist
- the spotify id or uri for the playlist.market
- Provide this parameter if you want to apply Track Relinkingpublic SpotifyRestActionPaging<com.adamratzman.spotify.models.PlaylistTrack,com.adamratzman.spotify.models.PagingObject> getPlaylistTracks(java.lang.String playlist, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get full details of the tracks of a playlist owned by a Spotify user.
playlist
- the spotify id or uri for the playlist.market
- Provide this parameter if you want to apply Track Relinkinglimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemspublic SpotifyRestAction<java.util.List> getPlaylistCovers(java.lang.String playlist)+
Get the current image associated with a specific playlist.
playlist
- the spotify id or uri for the playlist.public static enum SearchAPI.SearchType
+Describes which object to search for
public static SearchAPI.SearchType ALBUM+
public static SearchAPI.SearchType TRACK+
public static SearchAPI.SearchType ARTIST+
public static SearchAPI.SearchType PLAYLIST+
public class SearchAPI
+extends SpotifyEndpoint
+Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.
Constructor and Description | +
---|
SearchAPI(SpotifyAPI api)
+Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.SpotifySearchResult> |
+search(java.lang.String query,
+ SearchAPI.SearchType[] searchTypes,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market,
+ java.lang.Boolean includeExternal)
+Get Spotify Catalog information about artists, albums, tracks and/or playlists that match a keyword string.
+ |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleAlbum,com.adamratzman.spotify.models.PagingObject> |
+searchAlbum(java.lang.String query,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify Catalog information about albums that match the keyword string. See
+SearchAPI.search for more information |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.Artist,com.adamratzman.spotify.models.PagingObject> |
+searchArtist(java.lang.String query,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify Catalog information about artists that match the keyword string. See
+SearchAPI.search for more information |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> |
+searchPlaylist(java.lang.String query,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify Catalog information about playlists that match the keyword string. See
+SearchAPI.search for more information |
+
SpotifyRestActionPaging<com.adamratzman.spotify.models.Track,com.adamratzman.spotify.models.PagingObject> |
+searchTrack(java.lang.String query,
+ java.lang.Integer limit,
+ java.lang.Integer offset,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify Catalog information about tracks that match the keyword string. See
+SearchAPI.search for more information |
+
getApi, getCache
public SearchAPI(SpotifyAPI api)+
Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.
public SpotifyRestAction<com.adamratzman.spotify.models.SpotifySearchResult> search(java.lang.String query, + SearchAPI.SearchType[] searchTypes, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market, + java.lang.Boolean includeExternal)+
Get Spotify Catalog information about artists, albums, tracks and/or playlists that match a keyword string.
Information from Spotify: +Writing a Query - Guidelines
Keyword matching:
Matching of search keywords is not case-sensitive. Operators, however, should be specified in uppercase. Unless surrounded by double quotation marks, keywords are matched in any order. For example: q=roadhouse&20blues matches both “Blues Roadhouse” and “Roadhouse of the Blues”. q="roadhouse&20blues" matches “My Roadhouse Blues” but not “Roadhouse of the Blues”.
Searching for playlists returns results where the query keyword(s) match any part of the playlist’s name or description. Only popular public playlists are returned.
Operator: The operator NOT can be used to exclude results.
For example: q=roadhouse%20NOT%20blues returns items that match “roadhouse” but excludes those that also contain the keyword “blues”.
Similarly, the OR operator can be used to broaden the search: q=roadhouse%20OR%20blues returns all the results that include either of the terms. Only one OR operator can be used in a query.
Note: Operators must be specified in uppercase. Otherwise, they are handled as normal keywords to be matched.
Wildcards: The asterisk (*) character can, with some limitations, be used as a wildcard (maximum: 2 per query). It matches a variable number of non-white-space characters. It cannot be used:
in a quoted phrase
in a field filter
when there is a dash (“-“) in the query
or as the first character of the keyword string Field filters: By default, results are returned when a match is found in any field of the target object type. Searches can be made more specific by specifying an album, artist or track field filter.
For example: The query q=album:gold%20artist:abba&type=album returns only albums with the text “gold” in the album name and the text “abba” in the artist name.
To limit the results to a particular year, use the field filter year with album, artist, and track searches.
For example: q=bob%20year:2014
Or with a date range. For example: q=bob%20year:1980-2020 To retrieve only albums released in the last two weeks, use the field filter tag:new in album searches.
To retrieve only albums with the lowest 10% popularity, use the field filter tag:hipster in album searches. Note: This field filter only works with album searches.
Depending on object types being searched for, other field filters, include genre (applicable to tracks and artists), upc, and isrc. For example: q=lil%20genre:%22southern%20hip%20hop%22&type=artist. Use double quotation marks around the genre keyword string if it contains spaces.
query
- Search query keywords and optional field filters and operators.searchTypes
- A list of item types to search across. Search results include hits from all the specified item types.limit
- Maximum number of results to return.
+Default: 20
+Minimum: 1
+Maximum: 50
+Note: The limit is applied within each type, not on the total response.
+For example, if the limit value is 3 and the type is artist,album, the response contains 3 artists and 3 albums.offset
- The index of the first result to return.
+Default: 0 (the first result).
+Maximum offset (including limit): 10,000.
+Use with limit to get the next page of search results.market
- If a country code is specified, only artists, albums, and tracks with content that is playable in that market is returned. Note:includeExternal
- If true, the response will include any relevant audio content that is hosted externally. By default external content is filtered out from responses.public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimplePlaylist,com.adamratzman.spotify.models.PagingObject> searchPlaylist(java.lang.String query, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify Catalog information about playlists that match the keyword string. See SearchAPI.search
for more information
query
- Search query keywords and optional field filters and operators.market
- Provide this parameter if you want to apply Track Relinkinglimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of full class Playlist
objects ordered by likelihood of correct matchSearchAPI.search
,
+SearchAPI.search
public SpotifyRestActionPaging<com.adamratzman.spotify.models.Artist,com.adamratzman.spotify.models.PagingObject> searchArtist(java.lang.String query, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify Catalog information about artists that match the keyword string. See SearchAPI.search
for more information
query
- Search query keywords and optional field filters and operators.market
- Provide this parameter if you want to apply Track Relinkinglimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of full class Artist
objects ordered by likelihood of correct matchSearchAPI.search
,
+SearchAPI.search
public SpotifyRestActionPaging<com.adamratzman.spotify.models.SimpleAlbum,com.adamratzman.spotify.models.PagingObject> searchAlbum(java.lang.String query, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify Catalog information about albums that match the keyword string. See SearchAPI.search
for more information
query
- Search query keywords and optional field filters and operators.market
- Provide this parameter if you want to apply Track Relinkinglimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of non-full class SimpleAlbum
objects ordered by likelihood of correct matchSearchAPI.search
,
+SearchAPI.search
public SpotifyRestActionPaging<com.adamratzman.spotify.models.Track,com.adamratzman.spotify.models.PagingObject> searchTrack(java.lang.String query, + java.lang.Integer limit, + java.lang.Integer offset, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify Catalog information about tracks that match the keyword string. See SearchAPI.search
for more information
query
- Search query keywords and optional field filters and operators.market
- Provide this parameter if you want to apply Track Relinkinglimit
- The number of objects to return. Default: 20. Minimum: 1. Maximum: 50.offset
- The index of the first item to return. Default: 0. Use with limit to get the next set of itemsclass PagingObject
of non-full class SimpleTrack
objects ordered by likelihood of correct matchSearchAPI.search
,
+SearchAPI.search
public static class TrackAttribute.Companion
+Modifier and Type | +Method and Description | +
---|---|
<T extends Number> |
+create(TuneableTrackAttribute<T> tuneableTrackAttribute,
+ T value) |
+
public <T extends Number> TrackAttribute<T> create(TuneableTrackAttribute<T> tuneableTrackAttribute, + T value)+
public class TrackAttribute<T extends Number>
+Modifier and Type | +Class and Description | +
---|---|
static class |
+TrackAttribute.Companion |
+
Modifier and Type | +Field and Description | +
---|---|
static TrackAttribute.Companion |
+Companion |
+
Constructor and Description | +
---|
TrackAttribute(TuneableTrackAttribute<T> tuneableTrackAttribute,
+ T value) |
+
Modifier and Type | +Method and Description | +
---|---|
TuneableTrackAttribute<T> |
+component1() |
+
T |
+component2() |
+
TrackAttribute<T> |
+copy(TuneableTrackAttribute<T> tuneableTrackAttribute,
+ T value) |
+
boolean |
+equals(java.lang.Object p) |
+
TuneableTrackAttribute<T> |
+getTuneableTrackAttribute() |
+
T |
+getValue() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public static TrackAttribute.Companion Companion+
public TrackAttribute(TuneableTrackAttribute<T> tuneableTrackAttribute, + T value)+
public TuneableTrackAttribute<T> getTuneableTrackAttribute()+
public T getValue()+
public TuneableTrackAttribute<T> component1()+
public T component2()+
public TrackAttribute<T> copy(TuneableTrackAttribute<T> tuneableTrackAttribute, + T value)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TracksAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about one or more tracks from the Spotify catalog.
Constructor and Description | +
---|
TracksAPI(SpotifyAPI api)
+Endpoints for retrieving information about one or more tracks from the Spotify catalog.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.AudioAnalysis> |
+getAudioAnalysis(java.lang.String track)
+Get a detailed audio analysis for a single track identified by its unique Spotify ID.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.AudioFeatures> |
+getAudioFeatures(java.lang.String track)
+Get audio feature information for a single track identified by its unique Spotify ID.
+ |
+
SpotifyRestAction<java.util.List> |
+getAudioFeatures(java.lang.String tracks)
+Get audio features for multiple tracks based on their Spotify IDs.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.Track> |
+getTrack(java.lang.String track,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify catalog information for a single track identified by its unique Spotify ID.
+ |
+
SpotifyRestAction<java.util.List> |
+getTracks(java.lang.String[] tracks,
+ com.neovisionaries.i18n.CountryCode market)
+Get Spotify catalog information for multiple tracks based on their Spotify IDs.
+ |
+
getApi, getCache
public TracksAPI(SpotifyAPI api)+
Endpoints for retrieving information about one or more tracks from the Spotify catalog.
public SpotifyRestAction<com.adamratzman.spotify.models.Track> getTrack(java.lang.String track, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify catalog information for a single track identified by its unique Spotify ID.
track
- The spotify id or uri for the track.market
- Provide this parameter if you want to apply Track RelinkingTracksAPI.getTracks
public SpotifyRestAction<java.util.List> getTracks(java.lang.String[] tracks, + com.neovisionaries.i18n.CountryCode market)+
Get Spotify catalog information for multiple tracks based on their Spotify IDs.
tracks
- The spotify id or uri for the tracks.market
- Provide this parameter if you want to apply Track Relinkingclass Track
objects.public SpotifyRestAction<com.adamratzman.spotify.models.AudioAnalysis> getAudioAnalysis(java.lang.String track)+
Get a detailed audio analysis for a single track identified by its unique Spotify ID.
The Audio Analysis endpoint provides low-level audio analysis for all of the tracks in the Spotify catalog. +The Audio Analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre. +All information is precise to the audio sample.
Many elements of analysis include confidence values, a floating-point number ranging from 0.0 to 1.0. +Confidence indicates the reliability of its corresponding attribute. Elements carrying a small confidence value +should be considered speculative. There may not be sufficient data in the audio to compute the attribute with +high certainty.
track
- The spotify id or uri for the track.public SpotifyRestAction<com.adamratzman.spotify.models.AudioFeatures> getAudioFeatures(java.lang.String track)+
Get audio feature information for a single track identified by its unique Spotify ID.
track
- The spotify id or uri for the track.public SpotifyRestAction<java.util.List> getAudioFeatures(java.lang.String tracks)+
Get audio features for multiple tracks based on their Spotify IDs.
tracks
- vararg of spotify track ids or uris.class AudioFeatures
objects.public static class TuneableTrackAttribute.ACOUSTICNESS
+extends TuneableTrackAttribute
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic. +1.0 represents high confidence the track is acoustic.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.ACOUSTICNESS |
+INSTANCE
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
+1.0 represents high confidence the track is acoustic.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.ACOUSTICNESS INSTANCE+
A confidence measure from 0.0 to 1.0 of whether the track is acoustic. +1.0 represents high confidence the track is acoustic.
public static class TuneableTrackAttribute.Companion
+Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.endpoints.public.TuneableTrackAttribute> |
+values() |
+
public static class TuneableTrackAttribute.DANCEABILITY
+extends TuneableTrackAttribute
+Danceability describes how suitable a track is for dancing based on a combination of musical +elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is +least danceable and 1.0 is most danceable.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.DANCEABILITY |
+INSTANCE
+Danceability describes how suitable a track is for dancing based on a combination of musical
+elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is
+least danceable and 1.0 is most danceable.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.DANCEABILITY INSTANCE+
Danceability describes how suitable a track is for dancing based on a combination of musical +elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is +least danceable and 1.0 is most danceable.
public static class TuneableTrackAttribute.DURATION_IN_MILLISECONDS
+extends TuneableTrackAttribute
+The duration of the track in milliseconds.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.DURATION_IN_MILLISECONDS |
+INSTANCE
+The duration of the track in milliseconds.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.DURATION_IN_MILLISECONDS INSTANCE+
The duration of the track in milliseconds.
public static class TuneableTrackAttribute.ENERGY
+extends TuneableTrackAttribute
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. +Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy, +while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute +include dynamic range, perceived loudness, timbre, onset rate, and general entropy.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.ENERGY |
+INSTANCE
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity.
+Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,
+while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute
+include dynamic range, perceived loudness, timbre, onset rate, and general entropy.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.ENERGY INSTANCE+
Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. +Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy, +while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute +include dynamic range, perceived loudness, timbre, onset rate, and general entropy.
public static class TuneableTrackAttribute.INSTRUMENTALNESS
+extends TuneableTrackAttribute
+Predicts whether a track contains no vocals. “Ooh” and “aah” sounds are treated as +instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The +closer the instrumentalness value is to 1.0, the greater likelihood the track contains +no vocal content. Values above 0.5 are intended to represent instrumental tracks, but +confidence is higher as the value approaches 1.0.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.INSTRUMENTALNESS |
+INSTANCE
+Predicts whether a track contains no vocals. “Ooh” and “aah” sounds are treated as
+instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The
+closer the instrumentalness value is to 1.0, the greater likelihood the track contains
+no vocal content. Values above 0.5 are intended to represent instrumental tracks, but
+confidence is higher as the value approaches 1.0.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.INSTRUMENTALNESS INSTANCE+
Predicts whether a track contains no vocals. “Ooh” and “aah” sounds are treated as +instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The +closer the instrumentalness value is to 1.0, the greater likelihood the track contains +no vocal content. Values above 0.5 are intended to represent instrumental tracks, but +confidence is higher as the value approaches 1.0.
public static class TuneableTrackAttribute.KEY
+extends TuneableTrackAttribute
+The key the track is in. Integers map to pitches using standard Pitch Class notation. +E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.KEY |
+INSTANCE
+The key the track is in. Integers map to pitches using standard Pitch Class notation.
+E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.KEY INSTANCE+
The key the track is in. Integers map to pitches using standard Pitch Class notation. +E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
public static class TuneableTrackAttribute.LIVENESS
+extends TuneableTrackAttribute
+Detects the presence of an audience in the recording. Higher liveness values represent an increased +probability that the track was performed live. A value above 0.8 provides strong likelihood +that the track is live.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.LIVENESS |
+INSTANCE
+Detects the presence of an audience in the recording. Higher liveness values represent an increased
+probability that the track was performed live. A value above 0.8 provides strong likelihood
+that the track is live.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.LIVENESS INSTANCE+
Detects the presence of an audience in the recording. Higher liveness values represent an increased +probability that the track was performed live. A value above 0.8 provides strong likelihood +that the track is live.
public static class TuneableTrackAttribute.LOUDNESS
+extends TuneableTrackAttribute
+The overall loudness of a track in decibels (dB). Loudness values are averaged across the +entire track and are useful for comparing relative loudness of tracks. Loudness is the +quality of a sound that is the primary psychological correlate of physical strength (amplitude). +Values typically range between -60 and 0 db.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.LOUDNESS |
+INSTANCE
+The overall loudness of a track in decibels (dB). Loudness values are averaged across the
+entire track and are useful for comparing relative loudness of tracks. Loudness is the
+quality of a sound that is the primary psychological correlate of physical strength (amplitude).
+Values typically range between -60 and 0 db.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.LOUDNESS INSTANCE+
The overall loudness of a track in decibels (dB). Loudness values are averaged across the +entire track and are useful for comparing relative loudness of tracks. Loudness is the +quality of a sound that is the primary psychological correlate of physical strength (amplitude). +Values typically range between -60 and 0 db.
public static class TuneableTrackAttribute.MODE
+extends TuneableTrackAttribute
+Mode indicates the modality (major or minor) of a track, the type of scale from which its +melodic content is derived. Major is represented by 1 and minor is 0.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.MODE |
+INSTANCE
+Mode indicates the modality (major or minor) of a track, the type of scale from which its
+melodic content is derived. Major is represented by 1 and minor is 0.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.MODE INSTANCE+
Mode indicates the modality (major or minor) of a track, the type of scale from which its +melodic content is derived. Major is represented by 1 and minor is 0.
public static class TuneableTrackAttribute.POPULARITY
+extends TuneableTrackAttribute
+The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. +The popularity is calculated by algorithm and is based, in the most part, on the total number of +plays the track has had and how recent those plays are. Note: When applying track relinking via +the market parameter, it is expected to find relinked tracks with popularities that do not match +min_*, max_and target popularities. These relinked tracks are accurate replacements for unplayable tracks with the expected popularity scores. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.POPULARITY |
+INSTANCE
+The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.
+The popularity is calculated by algorithm and is based, in the most part, on the total number of
+plays the track has had and how recent those plays are. Note: When applying track relinking via
+the market parameter, it is expected to find relinked tracks with popularities that do not match
+min_*, max_and target popularities. These relinked tracks are accurate replacements for unplayable tracks with the expected popularity scores. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.POPULARITY INSTANCE+
The popularity of the track. The value will be between 0 and 100, with 100 being the most popular. +The popularity is calculated by algorithm and is based, in the most part, on the total number of +plays the track has had and how recent those plays are. Note: When applying track relinking via +the market parameter, it is expected to find relinked tracks with popularities that do not match +min_*, max_and target popularities. These relinked tracks are accurate replacements for unplayable tracks with the expected popularity scores. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response.
public static class TuneableTrackAttribute.SPEECHINESS
+extends TuneableTrackAttribute
+Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the +recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above +0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66 +describe tracks that may contain both music and speech, either in sections or layered, including +such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like +tracks.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.SPEECHINESS |
+INSTANCE
+Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the
+recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above
+0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66
+describe tracks that may contain both music and speech, either in sections or layered, including
+such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like
+tracks.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.SPEECHINESS INSTANCE+
Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the +recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above +0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66 +describe tracks that may contain both music and speech, either in sections or layered, including +such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like +tracks.
public static class TuneableTrackAttribute.TEMPO
+extends TuneableTrackAttribute
+The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the +speed or pace of a given piece and derives directly from the average beat duration.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.TEMPO |
+INSTANCE
+The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the
+speed or pace of a given piece and derives directly from the average beat duration.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.TEMPO INSTANCE+
The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the +speed or pace of a given piece and derives directly from the average beat duration.
public static class TuneableTrackAttribute.TIME_SIGNATURE
+extends TuneableTrackAttribute
+An estimated overall time signature of a track. The time signature (meter) +is a notational convention to specify how many beats are in each bar (or measure). +The time signature ranges from 3 to 7 indicating time signatures of 3/4, to 7/4. +A value of -1 may indicate no time signature, while a value of 1 indicates a rather complex or changing time signature.
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.TIME_SIGNATURE |
+INSTANCE
+An estimated overall time signature of a track. The time signature (meter)
+is a notational convention to specify how many beats are in each bar (or measure).
+The time signature ranges from 3 to 7 indicating time signatures of 3/4, to 7/4.
+A value of -1 may indicate no time signature, while a value of 1 indicates a rather complex or changing time signature.
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.TIME_SIGNATURE INSTANCE+
An estimated overall time signature of a track. The time signature (meter) +is a notational convention to specify how many beats are in each bar (or measure). +The time signature ranges from 3 to 7 indicating time signatures of 3/4, to 7/4. +A value of -1 may indicate no time signature, while a value of 1 indicates a rather complex or changing time signature.
public static class TuneableTrackAttribute.VALENCE
+extends TuneableTrackAttribute
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high +valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence +sound more negative (e.g. sad, depressed, angry).
TuneableTrackAttribute.ACOUSTICNESS, TuneableTrackAttribute.Companion, TuneableTrackAttribute.DANCEABILITY, TuneableTrackAttribute.DURATION_IN_MILLISECONDS, TuneableTrackAttribute.ENERGY, TuneableTrackAttribute.INSTRUMENTALNESS, TuneableTrackAttribute.KEY, TuneableTrackAttribute.LIVENESS, TuneableTrackAttribute.LOUDNESS, TuneableTrackAttribute.MODE, TuneableTrackAttribute.POPULARITY, TuneableTrackAttribute.SPEECHINESS, TuneableTrackAttribute.TEMPO, TuneableTrackAttribute.TIME_SIGNATURE, TuneableTrackAttribute.VALENCE
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.VALENCE |
+INSTANCE
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high
+valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence
+sound more negative (e.g. sad, depressed, angry).
+ |
+
Companion
asTrackAttribute, getAttribute, getIntegerOnly, getMax, getMin, toString
public static TuneableTrackAttribute.VALENCE INSTANCE+
A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high +valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence +sound more negative (e.g. sad, depressed, angry).
public class TuneableTrackAttribute<T extends Number>
+Describes a track attribute
Modifier and Type | +Class and Description | +
---|---|
static class |
+TuneableTrackAttribute.ACOUSTICNESS
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
+1.0 represents high confidence the track is acoustic.
+ |
+
static class |
+TuneableTrackAttribute.Companion |
+
static class |
+TuneableTrackAttribute.DANCEABILITY
+Danceability describes how suitable a track is for dancing based on a combination of musical
+elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is
+least danceable and 1.0 is most danceable.
+ |
+
static class |
+TuneableTrackAttribute.DURATION_IN_MILLISECONDS
+The duration of the track in milliseconds.
+ |
+
static class |
+TuneableTrackAttribute.ENERGY
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity.
+Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,
+while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute
+include dynamic range, perceived loudness, timbre, onset rate, and general entropy.
+ |
+
static class |
+TuneableTrackAttribute.INSTRUMENTALNESS
+Predicts whether a track contains no vocals. “Ooh” and “aah” sounds are treated as
+instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The
+closer the instrumentalness value is to 1.0, the greater likelihood the track contains
+no vocal content. Values above 0.5 are intended to represent instrumental tracks, but
+confidence is higher as the value approaches 1.0.
+ |
+
static class |
+TuneableTrackAttribute.KEY
+The key the track is in. Integers map to pitches using standard Pitch Class notation.
+E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
+ |
+
static class |
+TuneableTrackAttribute.LIVENESS
+Detects the presence of an audience in the recording. Higher liveness values represent an increased
+probability that the track was performed live. A value above 0.8 provides strong likelihood
+that the track is live.
+ |
+
static class |
+TuneableTrackAttribute.LOUDNESS
+The overall loudness of a track in decibels (dB). Loudness values are averaged across the
+entire track and are useful for comparing relative loudness of tracks. Loudness is the
+quality of a sound that is the primary psychological correlate of physical strength (amplitude).
+Values typically range between -60 and 0 db.
+ |
+
static class |
+TuneableTrackAttribute.MODE
+Mode indicates the modality (major or minor) of a track, the type of scale from which its
+melodic content is derived. Major is represented by 1 and minor is 0.
+ |
+
static class |
+TuneableTrackAttribute.POPULARITY
+The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.
+The popularity is calculated by algorithm and is based, in the most part, on the total number of
+plays the track has had and how recent those plays are. Note: When applying track relinking via
+the market parameter, it is expected to find relinked tracks with popularities that do not match
+min_*, max_and target popularities. These relinked tracks are accurate replacements for unplayable tracks with the expected popularity scores. Original, non-relinked tracks are available via the linked_from attribute of the relinked track response.
+ |
+
static class |
+TuneableTrackAttribute.SPEECHINESS
+Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the
+recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above
+0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66
+describe tracks that may contain both music and speech, either in sections or layered, including
+such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like
+tracks.
+ |
+
static class |
+TuneableTrackAttribute.TEMPO
+The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the
+speed or pace of a given piece and derives directly from the average beat duration.
+ |
+
static class |
+TuneableTrackAttribute.TIME_SIGNATURE
+An estimated overall time signature of a track. The time signature (meter)
+is a notational convention to specify how many beats are in each bar (or measure).
+The time signature ranges from 3 to 7 indicating time signatures of 3/4, to 7/4.
+A value of -1 may indicate no time signature, while a value of 1 indicates a rather complex or changing time signature.
+ |
+
static class |
+TuneableTrackAttribute.VALENCE
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high
+valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence
+sound more negative (e.g. sad, depressed, angry).
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static TuneableTrackAttribute.Companion |
+Companion |
+
Modifier and Type | +Method and Description | +
---|---|
TrackAttribute<T> |
+asTrackAttribute(T value) |
+
java.lang.String |
+getAttribute()
+The spotify id for the track attribute
+ |
+
boolean |
+getIntegerOnly() |
+
T |
+getMax() |
+
T |
+getMin() |
+
java.lang.String |
+toString() |
+
public static TuneableTrackAttribute.Companion Companion+
public java.lang.String toString()+
public TrackAttribute<T> asTrackAttribute(T value)+
public java.lang.String getAttribute()+
The spotify id for the track attribute
public boolean getIntegerOnly()+
public T getMin()+
public T getMax()+
public class UserAPI
+extends SpotifyEndpoint
+Endpoints for retrieving information about a user’s profile.
Constructor and Description | +
---|
UserAPI(SpotifyAPI api)
+Endpoints for retrieving information about a user’s profile.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<com.adamratzman.spotify.models.SpotifyPublicUser> |
+getProfile(java.lang.String user)
+Get public profile information about a Spotify user.
+ |
+
getApi, getCache
public UserAPI(SpotifyAPI api)+
Endpoints for retrieving information about a user’s profile.
public SpotifyRestAction<com.adamratzman.spotify.models.SpotifyPublicUser> getProfile(java.lang.String user)+
Get public profile information about a Spotify user.
user
- The user’s Spotify user ID.Class | +Description | +
---|---|
AlbumAPI | +
+ Endpoints for retrieving information about one or more albums from the Spotify catalog.
+ |
+
ArtistsAPI | +
+ Endpoints for retrieving information about one or more artists from the Spotify catalog.
+ |
+
BrowseAPI | +
+ Endpoints for getting playlists and new album releases featured on Spotify’s Browse tab.
+ |
+
FollowingAPI | +
+ This endpoint allow you check the playlists that a Spotify user follows.
+ |
+
PlaylistAPI | +
+ Endpoints for retrieving information about a user’s playlists
+ |
+
SearchAPI | +
+ Get Spotify catalog information about artists, albums, tracks or playlists that match a keyword string.
+ |
+
TrackAttribute<T extends Number> | ++ |
TracksAPI | +
+ Endpoints for retrieving information about one or more tracks from the Spotify catalog.
+ |
+
TuneableTrackAttribute<T extends Number> | +
+ Describes a track attribute
+ |
+
UserAPI | +
+ Endpoints for retrieving information about a user’s profile.
+ |
+
public class CacheState
+Constructor and Description | +
---|
CacheState(java.lang.String data,
+ java.lang.String eTag,
+ long expireBy) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
long |
+component3() |
+
CacheState |
+copy(java.lang.String data,
+ java.lang.String eTag,
+ long expireBy) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getData() |
+
java.lang.String |
+getETag() |
+
long |
+getExpireBy() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public CacheState(java.lang.String data, + java.lang.String eTag, + long expireBy)+
public java.lang.String getData()+
public java.lang.String getETag()+
public long getExpireBy()+
public java.lang.String component1()+
public java.lang.String component2()+
public long component3()+
public CacheState copy(java.lang.String data, + java.lang.String eTag, + long expireBy)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class EndpointsKt
+public class HttpHeader
+Constructor and Description | +
---|
HttpHeader(java.lang.String key,
+ java.lang.String value) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
HttpHeader |
+copy(java.lang.String key,
+ java.lang.String value) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getKey() |
+
java.lang.String |
+getValue() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public HttpHeader(java.lang.String key, + java.lang.String value)+
public java.lang.String getKey()+
public java.lang.String getValue()+
public java.lang.String component1()+
public java.lang.String component2()+
public HttpHeader copy(java.lang.String key, + java.lang.String value)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum HttpRequestMethod
+public static HttpRequestMethod GET+
public static HttpRequestMethod POST+
public static HttpRequestMethod PUT+
public static HttpRequestMethod DELETE+
public class SpotifyCache
+Constructor and Description | +
---|
SpotifyCache() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+clear() |
+
java.util.Map<com.adamratzman.spotify.http.SpotifyRequest,com.adamratzman.spotify.http.CacheState> |
+getCachedRequests() |
+
public class SpotifyEndpoint
+Constructor and Description | +
---|
SpotifyEndpoint(SpotifyAPI api) |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyAPI |
+getApi() |
+
SpotifyCache |
+getCache() |
+
public SpotifyEndpoint(SpotifyAPI api)+
public SpotifyCache getCache()+
public SpotifyAPI getApi()+
public class SpotifyRequest
+Constructor and Description | +
---|
SpotifyRequest(java.lang.String url,
+ HttpRequestMethod method,
+ java.lang.String body,
+ SpotifyAPI api) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
HttpRequestMethod |
+component2() |
+
java.lang.String |
+component3() |
+
SpotifyAPI |
+component4() |
+
SpotifyRequest |
+copy(java.lang.String url,
+ HttpRequestMethod method,
+ java.lang.String body,
+ SpotifyAPI api) |
+
boolean |
+equals(java.lang.Object p) |
+
SpotifyAPI |
+getApi() |
+
java.lang.String |
+getBody() |
+
HttpRequestMethod |
+getMethod() |
+
java.lang.String |
+getUrl() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyRequest(java.lang.String url, + HttpRequestMethod method, + java.lang.String body, + SpotifyAPI api)+
public java.lang.String getUrl()+
public HttpRequestMethod getMethod()+
public java.lang.String getBody()+
public SpotifyAPI getApi()+
public java.lang.String component1()+
public HttpRequestMethod component2()+
public java.lang.String component3()+
public SpotifyAPI component4()+
public SpotifyRequest copy(java.lang.String url, + HttpRequestMethod method, + java.lang.String body, + SpotifyAPI api)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
Class | +Description | +
---|---|
CacheState | ++ |
EndpointsKt | ++ |
HttpHeader | ++ |
SpotifyCache | ++ |
SpotifyEndpoint | ++ |
SpotifyRequest | ++ |
Enum | +Description | +
---|---|
HttpRequestMethod | ++ |
public class SpotifyAPI
+Modifier and Type | +Method and Description | +
---|---|
void |
+clearCache() |
+
AlbumAPI |
+getAlbums() |
+
ArtistsAPI |
+getArtists() |
+
java.lang.String |
+getAuthorizationUrl(SpotifyScope[] scopes,
+ java.lang.String redirectUri) |
+
BrowseAPI |
+getBrowse() |
+
java.lang.String |
+getClientId() |
+
java.lang.String |
+getClientSecret() |
+
FollowingAPI |
+getFollowing() |
+
com.beust.klaxon.Klaxon |
+getKlaxon() |
+
PlaylistsAPI |
+getPlaylists() |
+
SearchAPI |
+getSearch() |
+
Token |
+getToken() |
+
TracksAPI |
+getTracks() |
+
boolean |
+getUseCache() |
+
UserAPI |
+getUsers() |
+
void |
+refreshToken() |
+
void |
+setToken(Token p) |
+
void |
+setUseCache(boolean p) |
+
void |
+useLogger(boolean enable) |
+
public SearchAPI getSearch()+
public AlbumAPI getAlbums()+
public BrowseAPI getBrowse()+
public ArtistsAPI getArtists()+
public PlaylistsAPI getPlaylists()+
public UserAPI getUsers()+
public TracksAPI getTracks()+
public FollowingAPI getFollowing()+
public com.beust.klaxon.Klaxon getKlaxon()+
public void refreshToken()+
public void clearCache()+
public void useLogger(boolean enable)+
public java.lang.String getAuthorizationUrl(SpotifyScope[] scopes, + java.lang.String redirectUri)+
public java.lang.String getClientId()+
public java.lang.String getClientSecret()+
public Token getToken()+
public void setToken(Token p)+
public boolean getUseCache()+
public void setUseCache(boolean p)+
public class SpotifyAPIKt
+Modifier and Type | +Method and Description | +
---|---|
static SpotifyApiBuilder |
+spotifyApi(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiBuilderDsl,kotlin.Unit> block) |
+
public static SpotifyApiBuilder spotifyApi(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyApiBuilderDsl,kotlin.Unit> block)+
public class SpotifyApiBuilder
+Constructor and Description | +
---|
SpotifyApiBuilder() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+authentication(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyUserAuthorizationBuilder,kotlin.Unit> block)
+Allows you to authenticate a
+class SpotifyClientAPI with an authorization code
+or build class SpotifyAPI using a refresh token |
+
SpotifyClientAPI |
+buildClient(boolean automaticRefresh) |
+
void |
+buildClientAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyClientAPI,kotlin.Unit> consumer,
+ boolean automaticRefresh) |
+
SpotifyAPI |
+buildCredentialed() |
+
void |
+buildCredentialedAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyAPI,kotlin.Unit> consumer) |
+
void |
+credentials(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyCredentialsBuilder,kotlin.Unit> block) |
+
java.lang.String |
+getAuthorizationUrl(com.adamratzman.spotify.main.SpotifyScope scopes) |
+
boolean |
+getUseCache() |
+
void |
+setUseCache(boolean p) |
+
public boolean getUseCache()+
public void setUseCache(boolean p)+
public void credentials(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyCredentialsBuilder,kotlin.Unit> block)+
public void authentication(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyUserAuthorizationBuilder,kotlin.Unit> block)+
Allows you to authenticate a class SpotifyClientAPI
with an authorization code
+or build class SpotifyAPI
using a refresh token
class SpotifyClientAPI
,
+class SpotifyAPI
public java.lang.String getAuthorizationUrl(com.adamratzman.spotify.main.SpotifyScope scopes)+
public void buildCredentialedAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyAPI,kotlin.Unit> consumer)+
public SpotifyAPI buildCredentialed()+
public void buildClientAsync(kotlin.jvm.functions.Function1<? super com.adamratzman.spotify.SpotifyClientAPI,kotlin.Unit> consumer, + boolean automaticRefresh)+
public SpotifyClientAPI buildClient(boolean automaticRefresh)+
public class SpotifyApiBuilderJava
+Constructor and Description | +
---|
SpotifyApiBuilderJava(java.lang.String clientId,
+ java.lang.String clientSecret) |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyApiBuilderJava |
+authorizationCode(java.lang.String authorizationCode) |
+
SpotifyClientAPI |
+buildClient(boolean automaticRefresh) |
+
SpotifyAPI |
+buildCredentialed() |
+
java.lang.String |
+getAuthorizationCode() |
+
java.lang.String |
+getClientId() |
+
java.lang.String |
+getClientSecret() |
+
java.lang.String |
+getRedirectUri() |
+
Token |
+getToken() |
+
java.lang.String |
+getTokenString() |
+
boolean |
+getUseCache() |
+
SpotifyApiBuilderJava |
+redirectUri(java.lang.String redirectUri) |
+
void |
+setAuthorizationCode(java.lang.String p) |
+
void |
+setRedirectUri(java.lang.String p) |
+
void |
+setToken(Token p) |
+
void |
+setTokenString(java.lang.String p) |
+
void |
+setUseCache(boolean p) |
+
SpotifyApiBuilderJava |
+token(Token token) |
+
SpotifyApiBuilderJava |
+tokenString(java.lang.String tokenString) |
+
SpotifyApiBuilderJava |
+useCache(boolean useCache) |
+
public SpotifyApiBuilderJava(java.lang.String clientId, + java.lang.String clientSecret)+
public java.lang.String getRedirectUri()+
public void setRedirectUri(java.lang.String p)+
public java.lang.String getAuthorizationCode()+
public void setAuthorizationCode(java.lang.String p)+
public java.lang.String getTokenString()+
public void setTokenString(java.lang.String p)+
public Token getToken()+
public void setToken(Token p)+
public boolean getUseCache()+
public void setUseCache(boolean p)+
public SpotifyApiBuilderJava useCache(boolean useCache)+
public SpotifyApiBuilderJava redirectUri(java.lang.String redirectUri)+
public SpotifyApiBuilderJava authorizationCode(java.lang.String authorizationCode)+
public SpotifyApiBuilderJava tokenString(java.lang.String tokenString)+
public SpotifyApiBuilderJava token(Token token)+
public SpotifyAPI buildCredentialed()+
public SpotifyClientAPI buildClient(boolean automaticRefresh)+
public java.lang.String getClientId()+
public java.lang.String getClientSecret()+
public class SpotifyAppAPI
+extends SpotifyAPI
+Modifier and Type | +Method and Description | +
---|---|
void |
+clearCache() |
+
AlbumAPI |
+getAlbums() |
+
ArtistsAPI |
+getArtists() |
+
BrowseAPI |
+getBrowse() |
+
FollowingAPI |
+getFollowing() |
+
com.beust.klaxon.Klaxon |
+getKlaxon() |
+
PlaylistsAPI |
+getPlaylists() |
+
SearchAPI |
+getSearch() |
+
TracksAPI |
+getTracks() |
+
UserAPI |
+getUsers() |
+
void |
+refreshToken() |
+
clearCache, getAlbums, getArtists, getAuthorizationUrl, getBrowse, getClientId, getClientSecret, getFollowing, getKlaxon, getPlaylists, getSearch, getToken, getTracks, getUseCache, getUsers, refreshToken, setToken, setUseCache, useLogger
public SearchAPI getSearch()+
public AlbumAPI getAlbums()+
public BrowseAPI getBrowse()+
public ArtistsAPI getArtists()+
public PlaylistsAPI getPlaylists()+
public UserAPI getUsers()+
public TracksAPI getTracks()+
public FollowingAPI getFollowing()+
public com.beust.klaxon.Klaxon getKlaxon()+
public void refreshToken()+
public void clearCache()+
public class SpotifyClientAPI
+extends SpotifyAPI
+Modifier and Type | +Method and Description | +
---|---|
void |
+cancelAutomatics()
+This function will stop all automatic functions like refreshToken or clearCache
+ |
+
void |
+clearCache() |
+
AlbumAPI |
+getAlbums() |
+
ArtistsAPI |
+getArtists() |
+
java.lang.String |
+getAuthorizationUrl(com.adamratzman.spotify.main.SpotifyScope scopes) |
+
BrowseAPI |
+getBrowse() |
+
ClientFollowingAPI |
+getFollowing() |
+
com.beust.klaxon.Klaxon |
+getKlaxon() |
+
ClientLibraryAPI |
+getLibrary() |
+
ClientPersonalizationAPI |
+getPersonalization() |
+
ClientPlayerAPI |
+getPlayer() |
+
ClientPlaylistAPI |
+getPlaylists() |
+
java.lang.String |
+getRedirectUri() |
+
SearchAPI |
+getSearch() |
+
TracksAPI |
+getTracks() |
+
java.lang.String |
+getUserId() |
+
ClientUserAPI |
+getUsers() |
+
void |
+refreshToken() |
+
void |
+setRedirectUri(java.lang.String p) |
+
clearCache, getAlbums, getArtists, getAuthorizationUrl, getBrowse, getClientId, getClientSecret, getFollowing, getKlaxon, getPlaylists, getSearch, getToken, getTracks, getUseCache, getUsers, refreshToken, setToken, setUseCache, useLogger
public SearchAPI getSearch()+
public AlbumAPI getAlbums()+
public BrowseAPI getBrowse()+
public ArtistsAPI getArtists()+
public ClientPlaylistAPI getPlaylists()+
public ClientUserAPI getUsers()+
public TracksAPI getTracks()+
public ClientFollowingAPI getFollowing()+
public ClientPersonalizationAPI getPersonalization()+
public ClientLibraryAPI getLibrary()+
public ClientPlayerAPI getPlayer()+
public com.beust.klaxon.Klaxon getKlaxon()+
public java.lang.String getUserId()+
public void cancelAutomatics()+
This function will stop all automatic functions like refreshToken or clearCache
public void refreshToken()+
public void clearCache()+
public java.lang.String getAuthorizationUrl(com.adamratzman.spotify.main.SpotifyScope scopes)+
public java.lang.String getRedirectUri()+
public void setRedirectUri(java.lang.String p)+
public class SpotifyCredentials
+Constructor and Description | +
---|
SpotifyCredentials(java.lang.String clientId,
+ java.lang.String clientSecret,
+ java.lang.String redirectUri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
java.lang.String |
+component3() |
+
SpotifyCredentials |
+copy(java.lang.String clientId,
+ java.lang.String clientSecret,
+ java.lang.String redirectUri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getClientId() |
+
java.lang.String |
+getClientSecret() |
+
java.lang.String |
+getRedirectUri() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyCredentials(java.lang.String clientId, + java.lang.String clientSecret, + java.lang.String redirectUri)+
public java.lang.String getClientId()+
public java.lang.String getClientSecret()+
public java.lang.String getRedirectUri()+
public java.lang.String component1()+
public java.lang.String component2()+
public java.lang.String component3()+
public SpotifyCredentials copy(java.lang.String clientId, + java.lang.String clientSecret, + java.lang.String redirectUri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyCredentialsBuilder
+Constructor and Description | +
---|
SpotifyCredentialsBuilder() |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyCredentials |
+build() |
+
java.lang.String |
+getClientId()
+the client id of your Spotify application
+ |
+
java.lang.String |
+getClientSecret()
+the client secret of your Spotify application
+ |
+
java.lang.String |
+getRedirectUri()
+nullable redirect uri (use if you're doing client authentication
+ |
+
void |
+setClientId(java.lang.String p)
+the client id of your Spotify application
+ |
+
void |
+setClientSecret(java.lang.String p)
+the client secret of your Spotify application
+ |
+
void |
+setRedirectUri(java.lang.String p)
+nullable redirect uri (use if you're doing client authentication
+ |
+
public SpotifyCredentialsBuilder()+
public java.lang.String getClientId()+
the client id of your Spotify application
public void setClientId(java.lang.String p)+
the client id of your Spotify application
public java.lang.String getClientSecret()+
the client secret of your Spotify application
public void setClientSecret(java.lang.String p)+
the client secret of your Spotify application
public java.lang.String getRedirectUri()+
nullable redirect uri (use if you're doing client authentication
public void setRedirectUri(java.lang.String p)+
nullable redirect uri (use if you're doing client authentication
public SpotifyCredentials build()+
public class SpotifyException
+Constructor and Description | +
---|
SpotifyException(java.lang.String message,
+ java.lang.Throwable cause) |
+
public class SpotifyLogger
+Constructor and Description | +
---|
SpotifyLogger(boolean enabled) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+getEnabled() |
+
java.lang.String |
+getRedString() |
+
java.lang.String |
+getResetString() |
+
void |
+logError(boolean fatal,
+ java.lang.String message,
+ java.lang.Throwable throwable) |
+
void |
+logInfo(java.lang.String message) |
+
void |
+logWarning(java.lang.String message) |
+
void |
+setEnabled(boolean p) |
+
public java.lang.String getRedString()+
public java.lang.String getResetString()+
public void logInfo(java.lang.String message)+
public void logWarning(java.lang.String message)+
public void logError(boolean fatal, + java.lang.String message, + java.lang.Throwable throwable)+
public boolean getEnabled()+
public void setEnabled(boolean p)+
public class SpotifyRestAction<T>
+Constructor and Description | +
---|
SpotifyRestAction(SpotifyAPI api,
+ java.util.function.Supplier<T> supplier) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.concurrent.CompletableFuture<T> |
+asFuture() |
+
T |
+complete() |
+
SpotifyAPI |
+getApi() |
+
void |
+queue() |
+
void |
+queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer) |
+
void |
+queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer,
+ kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> failure) |
+
void |
+queueAfter(int quantity,
+ java.util.concurrent.TimeUnit timeUnit,
+ kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer) |
+
java.lang.String |
+toString() |
+
public SpotifyRestAction(SpotifyAPI api, + java.util.function.Supplier<T> supplier)+
public T complete()+
public void queue()+
public void queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer)+
public void queue(kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer, + kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> failure)+
public java.util.concurrent.CompletableFuture<T> asFuture()+
public void queueAfter(int quantity, + java.util.concurrent.TimeUnit timeUnit, + kotlin.jvm.functions.Function1<? super T,kotlin.Unit> consumer)+
public java.lang.String toString()+
public SpotifyAPI getApi()+
public class SpotifyRestActionPaging<Z,T extends AbstractPagingObject<Z>>
+extends SpotifyRestAction
+Constructor and Description | +
---|
SpotifyRestActionPaging(SpotifyAPI api,
+ java.util.function.Supplier<T> supplier) |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.sequences.Sequence> |
+getAll() |
+
SpotifyRestAction<java.util.List> |
+getAllItems() |
+
asFuture, complete, getApi, queue, queue, queue, queueAfter, toString
public SpotifyRestActionPaging(SpotifyAPI api, + java.util.function.Supplier<T> supplier)+
public SpotifyRestAction<kotlin.sequences.Sequence> getAll()+
public SpotifyRestAction<java.util.List> getAllItems()+
public enum SpotifyScope
+Enum Constant and Description | +
---|
PLAYLIST_MODIFY_PRIVATE |
+
PLAYLIST_MODIFY_PUBLIC |
+
PLAYLIST_READ_COLLABORATIVE |
+
PLAYLIST_READ_PRIVATE |
+
UGC_IMAGE_UPLOAD |
+
USER_FOLLOW_MODIFY |
+
USER_FOLLOW_READ |
+
USER_LIBRARY_MODIFY |
+
USER_LIBRARY_READ |
+
USER_READ_BIRTHDATE |
+
USER_READ_CURRENTLY_PLAYING |
+
USER_READ_EMAIL |
+
USER_READ_PLAYBACK_STATE |
+
USER_READ_PRIVATE |
+
USER_READ_RECENTLY_PLAYED |
+
USER_TOP_READ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getUri() |
+
public static SpotifyScope PLAYLIST_READ_PRIVATE+
public static SpotifyScope PLAYLIST_READ_COLLABORATIVE+
public static SpotifyScope PLAYLIST_MODIFY_PUBLIC+
public static SpotifyScope PLAYLIST_MODIFY_PRIVATE+
public static SpotifyScope UGC_IMAGE_UPLOAD+
public static SpotifyScope USER_FOLLOW_MODIFY+
public static SpotifyScope USER_FOLLOW_READ+
public static SpotifyScope USER_LIBRARY_READ+
public static SpotifyScope USER_LIBRARY_MODIFY+
public static SpotifyScope USER_READ_PRIVATE+
public static SpotifyScope USER_READ_BIRTHDATE+
public static SpotifyScope USER_READ_EMAIL+
public static SpotifyScope USER_TOP_READ+
public static SpotifyScope USER_READ_PLAYBACK_STATE+
public static SpotifyScope USER_READ_CURRENTLY_PLAYING+
public static SpotifyScope USER_READ_RECENTLY_PLAYED+
public class SpotifyUserAuthorizationBuilder
+Authentication methods.
Constructor and Description | +
---|
SpotifyUserAuthorizationBuilder(java.lang.String authorizationCode,
+ java.lang.String tokenString,
+ Token token)
+Authentication methods.
+ |
+
SpotifyUserAuthorizationBuilder()
+Authentication methods.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAuthorizationCode()
+Only available when building
+ |
+
Token |
+getToken()
+Build the API using an existing token.
+ |
+
java.lang.String |
+getTokenString()
+Build the API using an existing token
+ |
+
void |
+setAuthorizationCode(java.lang.String p)
+Only available when building
+ |
+
void |
+setToken(Token p)
+Build the API using an existing token.
+ |
+
void |
+setTokenString(java.lang.String p)
+Build the API using an existing token
+ |
+
public SpotifyUserAuthorizationBuilder(java.lang.String authorizationCode, + java.lang.String tokenString, + Token token)+
Authentication methods.
authorizationCode
- Only available when building class SpotifyClientAPI
. Spotify auth codetokenString
- Build the API using an existing token (string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes themtoken
- Build the API using an existing token. If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh tokenpublic SpotifyUserAuthorizationBuilder()+
Authentication methods.
public java.lang.String getAuthorizationCode()+
Only available when building
class SpotifyClientAPI
. Spotify auth code
class SpotifyClientAPI
public void setAuthorizationCode(java.lang.String p)+
Only available when building
class SpotifyClientAPI
. Spotify auth code
p
- Only available when building class SpotifyClientAPI
. Spotify auth codeclass SpotifyClientAPI
public java.lang.String getTokenString()+
Build the API using an existing token
(string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes them
class SpotifyClientAPI
,
+class SpotifyAPI
public void setTokenString(java.lang.String p)+
Build the API using an existing token
(string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes them
p
- Build the API using an existing token (string). If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token. There is a verylimited time constraint on these before the API automatically refreshes themclass SpotifyClientAPI
,
+class SpotifyAPI
public Token getToken()+
Build the API using an existing token.
If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token
class SpotifyClientAPI
,
+class SpotifyAPI
public void setToken(Token p)+
Build the API using an existing token.
If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh token
p
- Build the API using an existing token. If you're building class SpotifyClientAPI
, thiswill be your access token. If you're building class SpotifyAPI
, it will be your refresh tokenclass SpotifyClientAPI
,
+class SpotifyAPI
Class | +Description | +
---|---|
SpotifyAPI | ++ |
SpotifyAPIKt | ++ |
SpotifyApiBuilder | ++ |
SpotifyApiBuilderJava | ++ |
SpotifyAppAPI | ++ |
SpotifyClientAPI | ++ |
SpotifyCredentials | ++ |
SpotifyCredentialsBuilder | ++ |
SpotifyLogger | ++ |
SpotifyRestAction<T> | ++ |
SpotifyRestActionPaging<Z,T extends AbstractPagingObject<Z>> | ++ |
SpotifyUserAuthorizationBuilder | +
+ Authentication methods.
+ |
+
Enum | +Description | +
---|---|
SpotifyScope | ++ |
Exception | +Description | +
---|---|
SpotifyException | ++ |
public class AbstractPagingObject<T>
+Modifier and Type | +Field and Description | +
---|---|
java.lang.Class<T> |
+itemClazz |
+
Constructor and Description | +
---|
AbstractPagingObject(java.lang.String href,
+ java.util.List<? extends T> items,
+ int limit,
+ java.lang.String next,
+ int offset,
+ java.lang.String previous,
+ int total) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getHref()
+A link to the Web API endpoint returning the full result of the request.
+ |
+
java.lang.Class<T> |
+getItemClazz() |
+
java.util.List<T> |
+getItems()
+The requested data.
+ |
+
int |
+getLimit()
+The maximum number of items in the response
+ |
+
java.lang.String |
+getNext()
+URL to the next page of items.
+ |
+
int |
+getOffset()
+The offset of the items returned
+ |
+
java.lang.String |
+getPrevious()
+URL to the previous page of items.
+ |
+
int |
+getTotal()
+The maximum number of items available to return.
+ |
+
void |
+setItemClazz(java.lang.Class<T> p) |
+
public AbstractPagingObject(java.lang.String href, + java.util.List<? extends T> items, + int limit, + java.lang.String next, + int offset, + java.lang.String previous, + int total)+
href
- A link to the Web API endpoint returning the full result of the request.items
- The requested data.limit
- The maximum number of items in the response (as set in the query or by default).next
- URL to the next page of items. ( null if none)offset
- The offset of the items returned (as set in the query or by default).previous
- URL to the previous page of items. ( null if none)total
- The maximum number of items available to return.public java.lang.Class<T> getItemClazz()+
public void setItemClazz(java.lang.Class<T> p)+
public java.lang.String getHref()+
A link to the Web API endpoint returning the full result of the request.
public java.util.List<T> getItems()+
The requested data.
public int getLimit()+
The maximum number of items in the response
(as set in the query or by default).
public java.lang.String getNext()+
URL to the next page of items.
( null if none)
public int getOffset()+
The offset of the items returned
(as set in the query or by default).
public java.lang.String getPrevious()+
URL to the previous page of items.
( null if none)
public int getTotal()+
The maximum number of items available to return.
public class Album
+extends CoreObject
+Represents an Album on Spotify
Constructor and Description | +
---|
Album(java.lang.String _albumType,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.util.Map<java.lang.String,java.lang.String> _externalIds,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights,
+ java.util.List<java.lang.String> genres,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String label,
+ java.lang.String name,
+ int popularity,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks,
+ java.lang.String type,
+ int totalTracks,
+ Restrictions restrictions)
+Represents an Album on Spotify
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<java.lang.String> |
+component10()
+A list of the genres used to classify the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component11()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+component12()
+The label for the album.
+ |
+
java.lang.String |
+component13()
+The name of the album.
+ |
+
int |
+component14()
+The popularity of the album.
+ |
+
java.lang.String |
+component15()
+The date the album was first released,
+ |
+
java.lang.String |
+component16()
+The precision with which release
+ |
+
PagingObject<com.adamratzman.spotify.models.SimpleTrack> |
+component17()
+The tracks of the album.
+ |
+
java.lang.String |
+component18()
+The object type
+ |
+
int |
+component19()
+the total amount of tracks in this album
+ |
+
Restrictions |
+component20()
+Part of the response when Track Relinking is applied,
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component8()
+The artists of the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> |
+component9()
+The copyright statements of the album.
+ |
+
Album |
+copy(java.lang.String _albumType,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.util.Map<java.lang.String,java.lang.String> _externalIds,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights,
+ java.util.List<java.lang.String> genres,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String label,
+ java.lang.String name,
+ int popularity,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks,
+ java.lang.String type,
+ int totalTracks,
+ Restrictions restrictions)
+Represents an Album on Spotify
+ |
+
boolean |
+equals(java.lang.Object p) |
+
AlbumResultType |
+getAlbumType()
+The type of the album: one of "album" , "single" , or "compilation".
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists of the album.
+ |
+
java.util.List<com.neovisionaries.i18n.CountryCode> |
+getAvailableMarkets()
+The markets in which the album is available:
+ISO 3166-1 alpha-2 country codes. Note that an album is considered
+available in a market when at least 1 of its tracks is available in that market.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> |
+getCopyrights()
+The copyright statements of the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.ExternalId> |
+getExternalIds()
+Known external IDs for the album.
+ |
+
java.util.List<java.lang.String> |
+getGenres()
+A list of the genres used to classify the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+getLabel()
+The label for the album.
+ |
+
java.lang.String |
+getName()
+The name of the album.
+ |
+
int |
+getPopularity()
+The popularity of the album.
+ |
+
java.lang.String |
+getReleaseDate()
+The date the album was first released,
+ |
+
java.lang.String |
+getReleaseDatePrecision()
+The precision with which release
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+getTotalTracks()
+the total amount of tracks in this album
+ |
+
PagingObject<com.adamratzman.spotify.models.SimpleTrack> |
+getTracks()
+The tracks of the album.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public Album(java.lang.String _albumType, + java.util.List<java.lang.String> _availableMarkets, + java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.util.Map<java.lang.String,java.lang.String> _externalIds, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights, + java.util.List<java.lang.String> genres, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String label, + java.lang.String name, + int popularity, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks, + java.lang.String type, + int totalTracks, + Restrictions restrictions)+
Represents an Album on Spotify
artists
- The artists of the album. Each artist object includes a link in href to more detailedinformation about the artist.copyrights
- The copyright statements of the album.genres
- A list of the genres used to classify the album. For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)images
- The cover art for the album in various sizes, widest first.label
- The label for the album.name
- The name of the album. In case of an album takedown, the value may be an empty string.popularity
- The popularity of the album. The value will be between 0 and 100, with 100 being the mostpopular. The popularity is calculated from the popularity of the album’s individual tracks.releaseDate
- The date the album was first released, for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.releaseDatePrecision
- The precision with which release_date value is known: year , month , or day.tracks
- The tracks of the album.type
- The object type: “album”totalTracks
- the total amount of tracks in this albumrestrictions
- Part of the response when Track Relinking is applied, the original track is not availablein the given market, and Spotify did not have any tracks to relink it with.The track response will still contain metadata for the original track, and arestrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}public java.util.List<com.neovisionaries.i18n.CountryCode> getAvailableMarkets()+
The markets in which the album is available: +ISO 3166-1 alpha-2 country codes. Note that an album is considered +available in a market when at least 1 of its tracks is available in that market.
public java.util.List<com.adamratzman.spotify.models.ExternalId> getExternalIds()+
Known external IDs for the album.
public AlbumResultType getAlbumType()+
The type of the album: one of "album" , "single" , or "compilation".
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists of the album.
Each artist object includes a link in href to more detailedinformation about the artist.
public java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> getCopyrights()+
The copyright statements of the album.
public java.util.List<java.lang.String> getGenres()+
A list of the genres used to classify the album.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The cover art for the album in various sizes,
widest first.
public java.lang.String getLabel()+
The label for the album.
public java.lang.String getName()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public int getPopularity()+
The popularity of the album.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity is calculated from the popularity of the album’s individual tracks.
public java.lang.String getReleaseDate()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String getReleaseDatePrecision()+
The precision with which release
_date value is known: year , month , or day.
public PagingObject<com.adamratzman.spotify.models.SimpleTrack> getTracks()+
The tracks of the album.
public java.lang.String getType()+
The object type
: “album”
public int getTotalTracks()+
the total amount of tracks in this album
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with.The track response will still contain metadata for the original track, and arestrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component8()+
The artists of the album.
Each artist object includes a link in href to more detailedinformation about the artist.
public java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> component9()+
The copyright statements of the album.
public java.util.List<java.lang.String> component10()+
A list of the genres used to classify the album.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component11()+
The cover art for the album in various sizes,
widest first.
public java.lang.String component12()+
The label for the album.
public java.lang.String component13()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public int component14()+
The popularity of the album.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity is calculated from the popularity of the album’s individual tracks.
public java.lang.String component15()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String component16()+
The precision with which release
_date value is known: year , month , or day.
public PagingObject<com.adamratzman.spotify.models.SimpleTrack> component17()+
The tracks of the album.
public java.lang.String component18()+
The object type
: “album”
public int component19()+
the total amount of tracks in this album
public Restrictions component20()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with.The track response will still contain metadata for the original track, and arestrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}
public Album copy(java.lang.String _albumType, + java.util.List<java.lang.String> _availableMarkets, + java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.util.Map<java.lang.String,java.lang.String> _externalIds, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights, + java.util.List<java.lang.String> genres, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String label, + java.lang.String name, + int popularity, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks, + java.lang.String type, + int totalTracks, + Restrictions restrictions)+
Represents an Album on Spotify
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum AlbumResultType
+Album search type
Enum Constant and Description | +
---|
ALBUM |
+
APPEARS_ON |
+
COMPILATION |
+
SINGLE |
+
public static AlbumResultType ALBUM+
public static AlbumResultType SINGLE+
public static AlbumResultType COMPILATION+
public static AlbumResultType APPEARS_ON+
public class AlbumURI
+extends SpotifyUri
+Represents a Spotify Album URI, parsed from either a Spotify ID or taken from an endpoint.
public class Artist
+extends CoreObject
+Represents an Artist (distinct from a regular user) on Spotify
Constructor and Description | +
---|
Artist(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ Followers followers,
+ java.util.List<java.lang.String> genres,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ int popularity,
+ java.lang.String type)
+Represents an Artist (distinct from a regular user) on Spotify
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component10()
+The object type
+ |
+
Followers |
+component5()
+Information about the followers of the artist.
+ |
+
java.util.List<java.lang.String> |
+component6()
+A list of the genres the artist is associated with.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component7()
+Images of the artist in various sizes,
+ |
+
java.lang.String |
+component8()
+The name of the artist
+ |
+
int |
+component9()
+The popularity of the artist.
+ |
+
Artist |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ Followers followers,
+ java.util.List<java.lang.String> genres,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ int popularity,
+ java.lang.String type)
+Represents an Artist (distinct from a regular user) on Spotify
+ |
+
boolean |
+equals(java.lang.Object p) |
+
Followers |
+getFollowers()
+Information about the followers of the artist.
+ |
+
java.util.List<java.lang.String> |
+getGenres()
+A list of the genres the artist is associated with.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+Images of the artist in various sizes,
+ |
+
java.lang.String |
+getName()
+The name of the artist
+ |
+
int |
+getPopularity()
+The popularity of the artist.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public Artist(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + Followers followers, + java.util.List<java.lang.String> genres, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + int popularity, + java.lang.String type)+
Represents an Artist (distinct from a regular user) on Spotify
followers
- Information about the followers of the artist.genres
- A list of the genres the artist is associated with. For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)images
- Images of the artist in various sizes, widest first.name
- The name of the artistpopularity
- The popularity of the artist. The value will be between 0 and 100, with 100 being the mostpopular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.type
- The object type: "artist"public Followers getFollowers()+
Information about the followers of the artist.
public java.util.List<java.lang.String> getGenres()+
A list of the genres the artist is associated with.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
Images of the artist in various sizes,
widest first.
public java.lang.String getName()+
The name of the artist
public int getPopularity()+
The popularity of the artist.
The value will be between 0 and 100, with 100 being the mostpopular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.
public java.lang.String getType()+
The object type
: "artist"
public Followers component5()+
Information about the followers of the artist.
public java.util.List<java.lang.String> component6()+
A list of the genres the artist is associated with.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component7()+
Images of the artist in various sizes,
widest first.
public java.lang.String component8()+
The name of the artist
public int component9()+
The popularity of the artist.
The value will be between 0 and 100, with 100 being the mostpopular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.
public java.lang.String component10()+
The object type
: "artist"
public Artist copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + Followers followers, + java.util.List<java.lang.String> genres, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + int popularity, + java.lang.String type)+
Represents an Artist (distinct from a regular user) on Spotify
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ArtistURI
+extends SpotifyUri
+Represents a Spotify Artist URI, parsed from either a Spotify ID or taken from an endpoint.
public class AudioAnalysis
+The Audio Analysis endpoint provides low-level audio analysis for all of the tracks +in the Spotify catalog. The Audio Analysis describes the track’s structure +and musical content, including rhythm, pitch, and timbre. All information is +precise to the audio sample. Many elements of analysis include confidence values, +a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability +of its corresponding attribute. Elements carrying a small confidence value should +be considered speculative. There may not be sufficient data in the audio to +compute the attribute with high certainty.
Constructor and Description | +
---|
AudioAnalysis(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> beats,
+ AudioAnalysisMeta meta,
+ java.util.List<com.adamratzman.spotify.models.AudioSection> sections,
+ java.util.List<com.adamratzman.spotify.models.AudioSegment> segments,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums,
+ TrackAnalysis track)
+The Audio Analysis endpoint provides low-level audio analysis for all of the tracks
+in the Spotify catalog. The Audio Analysis describes the track’s structure
+and musical content, including rhythm, pitch, and timbre. All information is
+precise to the audio sample. Many elements of analysis include confidence values,
+a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability
+of its corresponding attribute. Elements carrying a small confidence value should
+be considered speculative. There may not be sufficient data in the audio to
+compute the attribute with high certainty.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+component1()
+The time intervals of the bars throughout the track.
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+component2()
+The time intervals of beats throughout the track.
+ |
+
AudioAnalysisMeta |
+component3()
+Analysis meta information
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSection> |
+component4()
+Sections are defined by large variations in rhythm or timbre,
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSegment> |
+component5()
+Audio segments attempts to subdivide a song into many segments,
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+component6()
+A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
+ |
+
TrackAnalysis |
+component7()
+An analysis of the track as a whole.
+ |
+
AudioAnalysis |
+copy(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> beats,
+ AudioAnalysisMeta meta,
+ java.util.List<com.adamratzman.spotify.models.AudioSection> sections,
+ java.util.List<com.adamratzman.spotify.models.AudioSegment> segments,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums,
+ TrackAnalysis track)
+The Audio Analysis endpoint provides low-level audio analysis for all of the tracks
+in the Spotify catalog. The Audio Analysis describes the track’s structure
+and musical content, including rhythm, pitch, and timbre. All information is
+precise to the audio sample. Many elements of analysis include confidence values,
+a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability
+of its corresponding attribute. Elements carrying a small confidence value should
+be considered speculative. There may not be sufficient data in the audio to
+compute the attribute with high certainty.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+getBars()
+The time intervals of the bars throughout the track.
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+getBeats()
+The time intervals of beats throughout the track.
+ |
+
AudioAnalysisMeta |
+getMeta()
+Analysis meta information
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSection> |
+getSections()
+Sections are defined by large variations in rhythm or timbre,
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSegment> |
+getSegments()
+Audio segments attempts to subdivide a song into many segments,
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+getTatums()
+A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
+ |
+
TrackAnalysis |
+getTrack()
+An analysis of the track as a whole.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioAnalysis(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars, + java.util.List<com.adamratzman.spotify.models.TimeInterval> beats, + AudioAnalysisMeta meta, + java.util.List<com.adamratzman.spotify.models.AudioSection> sections, + java.util.List<com.adamratzman.spotify.models.AudioSegment> segments, + java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums, + TrackAnalysis track)+
The Audio Analysis endpoint provides low-level audio analysis for all of the tracks +in the Spotify catalog. The Audio Analysis describes the track’s structure +and musical content, including rhythm, pitch, and timbre. All information is +precise to the audio sample. Many elements of analysis include confidence values, +a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability +of its corresponding attribute. Elements carrying a small confidence value should +be considered speculative. There may not be sufficient data in the audio to +compute the attribute with high certainty.
bars
- The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined asa given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.beats
- The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music;for example, each tick of a metronome. Beats are typically multiples of tatums.meta
- Analysis meta information (limited use)sections
- Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitarsolo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.segments
- Audio segments attempts to subdivide a song into many segments, with each segment containinga roughly consitent sound throughout its duration.tatums
- A tatum represents the lowest regular pulse train that a listener intuitively infers from the timingof perceived musical events (segments).track
- An analysis of the track as a whole. Undocumented on Spotify's side.public java.util.List<com.adamratzman.spotify.models.TimeInterval> getBars()+
The time intervals of the bars throughout the track.
A bar (or measure) is a segment of time defined asa given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> getBeats()+
The time intervals of beats throughout the track.
A beat is the basic time unit of a piece of music;for example, each tick of a metronome. Beats are typically multiples of tatums.
public AudioAnalysisMeta getMeta()+
Analysis meta information
(limited use)
public java.util.List<com.adamratzman.spotify.models.AudioSection> getSections()+
Sections are defined by large variations in rhythm or timbre,
e.g. chorus, verse, bridge, guitarsolo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.
public java.util.List<com.adamratzman.spotify.models.AudioSegment> getSegments()+
Audio segments attempts to subdivide a song into many segments,
with each segment containinga roughly consitent sound throughout its duration.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> getTatums()+
A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
of perceived musical events (segments).
public TrackAnalysis getTrack()+
An analysis of the track as a whole.
Undocumented on Spotify's side.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> component1()+
The time intervals of the bars throughout the track.
A bar (or measure) is a segment of time defined asa given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> component2()+
The time intervals of beats throughout the track.
A beat is the basic time unit of a piece of music;for example, each tick of a metronome. Beats are typically multiples of tatums.
public AudioAnalysisMeta component3()+
Analysis meta information
(limited use)
public java.util.List<com.adamratzman.spotify.models.AudioSection> component4()+
Sections are defined by large variations in rhythm or timbre,
e.g. chorus, verse, bridge, guitarsolo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.
public java.util.List<com.adamratzman.spotify.models.AudioSegment> component5()+
Audio segments attempts to subdivide a song into many segments,
with each segment containinga roughly consitent sound throughout its duration.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> component6()+
A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
of perceived musical events (segments).
public TrackAnalysis component7()+
An analysis of the track as a whole.
Undocumented on Spotify's side.
public AudioAnalysis copy(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars, + java.util.List<com.adamratzman.spotify.models.TimeInterval> beats, + AudioAnalysisMeta meta, + java.util.List<com.adamratzman.spotify.models.AudioSection> sections, + java.util.List<com.adamratzman.spotify.models.AudioSegment> segments, + java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums, + TrackAnalysis track)+
The Audio Analysis endpoint provides low-level audio analysis for all of the tracks +in the Spotify catalog. The Audio Analysis describes the track’s structure +and musical content, including rhythm, pitch, and timbre. All information is +precise to the audio sample. Many elements of analysis include confidence values, +a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability +of its corresponding attribute. Elements carrying a small confidence value should +be considered speculative. There may not be sufficient data in the audio to +compute the attribute with high certainty.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioAnalysisMeta
+Information about the analysis run
Constructor and Description | +
---|
AudioAnalysisMeta(java.lang.String analyzerVersion,
+ java.lang.String platform,
+ java.lang.String detailedStatus,
+ int statusCode,
+ long timestamp,
+ float analysisTime,
+ java.lang.String inputProcess)
+Information about the analysis run
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+Which version of the Spotify analyzer the analysis was run on
+ |
+
java.lang.String |
+component2()
+The OS the analysis was run on
+ |
+
java.lang.String |
+component3()
+Whether there was an error in the analysis or
+ |
+
int |
+component4()
+0 on success,
+ |
+
long |
+component5()
+When this analysis was completed
+ |
+
float |
+component6()
+How long,
+ |
+
java.lang.String |
+component7()
+The process used in the analysis
+ |
+
AudioAnalysisMeta |
+copy(java.lang.String analyzerVersion,
+ java.lang.String platform,
+ java.lang.String detailedStatus,
+ int statusCode,
+ long timestamp,
+ float analysisTime,
+ java.lang.String inputProcess)
+Information about the analysis run
+ |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getAnalysisTime()
+How long,
+ |
+
java.lang.String |
+getAnalyzerVersion()
+Which version of the Spotify analyzer the analysis was run on
+ |
+
java.lang.String |
+getDetailedStatus()
+Whether there was an error in the analysis or
+ |
+
java.lang.String |
+getInputProcess()
+The process used in the analysis
+ |
+
java.lang.String |
+getPlatform()
+The OS the analysis was run on
+ |
+
int |
+getStatusCode()
+0 on success,
+ |
+
long |
+getTimestamp()
+When this analysis was completed
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioAnalysisMeta(java.lang.String analyzerVersion, + java.lang.String platform, + java.lang.String detailedStatus, + int statusCode, + long timestamp, + float analysisTime, + java.lang.String inputProcess)+
Information about the analysis run
analyzerVersion
- Which version of the Spotify analyzer the analysis was run onplatform
- The OS the analysis was run ondetailedStatus
- Whether there was an error in the analysis or "OK"statusCode
- 0 on success, any other integer on errortimestamp
- When this analysis was completedanalysisTime
- How long, in milliseconds, this analysis took to runinputProcess
- The process used in the analysispublic java.lang.String getAnalyzerVersion()+
Which version of the Spotify analyzer the analysis was run on
public java.lang.String getPlatform()+
The OS the analysis was run on
public java.lang.String getDetailedStatus()+
Whether there was an error in the analysis or
"OK"
public int getStatusCode()+
0 on success,
any other integer on error
public long getTimestamp()+
When this analysis was completed
public float getAnalysisTime()+
How long,
in milliseconds, this analysis took to run
public java.lang.String getInputProcess()+
The process used in the analysis
public java.lang.String component1()+
Which version of the Spotify analyzer the analysis was run on
public java.lang.String component2()+
The OS the analysis was run on
public java.lang.String component3()+
Whether there was an error in the analysis or
"OK"
public int component4()+
0 on success,
any other integer on error
public long component5()+
When this analysis was completed
public float component6()+
How long,
in milliseconds, this analysis took to run
public java.lang.String component7()+
The process used in the analysis
public AudioAnalysisMeta copy(java.lang.String analyzerVersion, + java.lang.String platform, + java.lang.String detailedStatus, + int statusCode, + long timestamp, + float analysisTime, + java.lang.String inputProcess)+
Information about the analysis run
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioFeatures
+General attributes of a class Track
class Track
Constructor and Description | +
---|
AudioFeatures(float acousticness,
+ java.lang.String analysisUrl,
+ float danceability,
+ int durationMs,
+ float energy,
+ java.lang.String id,
+ float instrumentalness,
+ int key,
+ float liveness,
+ float loudness,
+ int mode,
+ float speechiness,
+ float tempo,
+ int timeSignature,
+ java.lang.String trackHref,
+ java.lang.String type,
+ java.lang.String _uri,
+ float valence)
+General attributes of a
+class Track |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
+ |
+
float |
+component10()
+The overall loudness of a track in decibels
+ |
+
int |
+component11()
+Mode indicates the modality
+ |
+
float |
+component12()
+Speechiness detects the presence of spoken words in a track.
+ |
+
float |
+component13()
+The overall estimated tempo of a track in beats per minute
+ |
+
int |
+component14()
+An estimated overall time signature of a track.
+ |
+
java.lang.String |
+component15()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+component16()
+The object type
+ |
+
float |
+component18()
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
+ |
+
java.lang.String |
+component2()
+An HTTP URL to access the full audio analysis of this track.
+ |
+
float |
+component3()
+Danceability describes how suitable a track is for dancing based on a combination
+ |
+
int |
+component4()
+The duration of the track in milliseconds.
+ |
+
float |
+component5()
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
+ |
+
java.lang.String |
+component6()
+The Spotify ID for the track.
+ |
+
float |
+component7()
+Predicts whether a track contains no vocals.
+ |
+
int |
+component8()
+The key the track is in.
+ |
+
float |
+component9()
+Detects the presence of an audience in the recording.
+ |
+
AudioFeatures |
+copy(float acousticness,
+ java.lang.String analysisUrl,
+ float danceability,
+ int durationMs,
+ float energy,
+ java.lang.String id,
+ float instrumentalness,
+ int key,
+ float liveness,
+ float loudness,
+ int mode,
+ float speechiness,
+ float tempo,
+ int timeSignature,
+ java.lang.String trackHref,
+ java.lang.String type,
+ java.lang.String _uri,
+ float valence)
+General attributes of a
+class Track |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getAcousticness()
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
+ |
+
java.lang.String |
+getAnalysisUrl()
+An HTTP URL to access the full audio analysis of this track.
+ |
+
float |
+getDanceability()
+Danceability describes how suitable a track is for dancing based on a combination
+ |
+
int |
+getDurationMs()
+The duration of the track in milliseconds.
+ |
+
float |
+getEnergy()
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the track.
+ |
+
float |
+getInstrumentalness()
+Predicts whether a track contains no vocals.
+ |
+
int |
+getKey()
+The key the track is in.
+ |
+
float |
+getLiveness()
+Detects the presence of an audience in the recording.
+ |
+
float |
+getLoudness()
+The overall loudness of a track in decibels
+ |
+
int |
+getMode()
+Mode indicates the modality
+ |
+
float |
+getSpeechiness()
+Speechiness detects the presence of spoken words in a track.
+ |
+
float |
+getTempo()
+The overall estimated tempo of a track in beats per minute
+ |
+
int |
+getTimeSignature()
+An estimated overall time signature of a track.
+ |
+
java.lang.String |
+getTrackHref()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
TrackURI |
+getUri()
+The Spotify URI for the track.
+ |
+
float |
+getValence()
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioFeatures(float acousticness, + java.lang.String analysisUrl, + float danceability, + int durationMs, + float energy, + java.lang.String id, + float instrumentalness, + int key, + float liveness, + float loudness, + int mode, + float speechiness, + float tempo, + int timeSignature, + java.lang.String trackHref, + java.lang.String type, + java.lang.String _uri, + float valence)+
General attributes of a class Track
acousticness
- A confidence measure from 0.0 to 1.0 of whether the track is acoustic.1.0 represents high confidence the track is acoustic.analysisUrl
- An HTTP URL to access the full audio analysis of this track.An access token is required to access this data.danceability
- Danceability describes how suitable a track is for dancing based on a combinationof musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of0.0 is least danceable and 1.0 is most danceable.durationMs
- The duration of the track in milliseconds.energy
- Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity andactivity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute includedynamic range, perceived loudness, timbre, onset rate, and general entropy.id
- The Spotify ID for the track.instrumentalness
- Predicts whether a track contains no vocals. “Ooh” and “aah” sounds aretreated as instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The closerthe instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.Values above 0.5 are intended to represent instrumental tracks, but confidence is higher asthe value approaches 1.0.key
- The key the track is in. Integers map to pitches using standard Pitch Class notation.E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.liveness
- Detects the presence of an audience in the recording. Higher liveness values representan increased probability that the track was performed live. A value above 0.8 provides strong likelihoodthat the track is live.loudness
- The overall loudness of a track in decibels (dB). Loudness values are averaged acrossthe entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of asound that is the primary psychological correlate of physical strength (amplitude). Values typical rangebetween -60 and 0 db.mode
- Mode indicates the modality (major or minor) of a track, the type of scale from whichits melodic content is derived. Major is represented by 1 and minor is 0.speechiness
- Speechiness detects the presence of spoken words in a track. The more exclusivelyspeech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33and 0.66 describe tracks that may contain both music and speech, either in sections or layered, includingsuch cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.tempo
- The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.timeSignature
- An estimated overall time signature of a track. The time signature (meter) is anotational convention to specify how many beats are in each bar (or measure).trackHref
- A link to the Web API endpoint providing full details of the track.type
- The object type: “audio_features”valence
- A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with lowvalence sound more negative (e.g. sad, depressed, angry).class Track
public TrackURI getUri()+
The Spotify URI for the track.
public float getAcousticness()+
A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
1.0 represents high confidence the track is acoustic.
public java.lang.String getAnalysisUrl()+
An HTTP URL to access the full audio analysis of this track.
An access token is required to access this data.
public float getDanceability()+
Danceability describes how suitable a track is for dancing based on a combination
of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of0.0 is least danceable and 1.0 is most danceable.
public int getDurationMs()+
The duration of the track in milliseconds.
public float getEnergy()+
Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute includedynamic range, perceived loudness, timbre, onset rate, and general entropy.
public java.lang.String getId()+
The Spotify ID for the track.
public float getInstrumentalness()+
Predicts whether a track contains no vocals.
“Ooh” and “aah” sounds aretreated as instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The closerthe instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.Values above 0.5 are intended to represent instrumental tracks, but confidence is higher asthe value approaches 1.0.
public int getKey()+
The key the track is in.
Integers map to pitches using standard Pitch Class notation.E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
public float getLiveness()+
Detects the presence of an audience in the recording.
Higher liveness values representan increased probability that the track was performed live. A value above 0.8 provides strong likelihoodthat the track is live.
public float getLoudness()+
The overall loudness of a track in decibels
(dB). Loudness values are averaged acrossthe entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of asound that is the primary psychological correlate of physical strength (amplitude). Values typical rangebetween -60 and 0 db.
public int getMode()+
Mode indicates the modality
(major or minor) of a track, the type of scale from whichits melodic content is derived. Major is represented by 1 and minor is 0.
public float getSpeechiness()+
Speechiness detects the presence of spoken words in a track.
The more exclusivelyspeech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33and 0.66 describe tracks that may contain both music and speech, either in sections or layered, includingsuch cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.
public float getTempo()+
The overall estimated tempo of a track in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public int getTimeSignature()+
An estimated overall time signature of a track.
The time signature (meter) is anotational convention to specify how many beats are in each bar (or measure).
public java.lang.String getTrackHref()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String getType()+
The object type
: “audio_features”
public float getValence()+
A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with lowvalence sound more negative (e.g. sad, depressed, angry).
public float component1()+
A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
1.0 represents high confidence the track is acoustic.
public java.lang.String component2()+
An HTTP URL to access the full audio analysis of this track.
An access token is required to access this data.
public float component3()+
Danceability describes how suitable a track is for dancing based on a combination
of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of0.0 is least danceable and 1.0 is most danceable.
public int component4()+
The duration of the track in milliseconds.
public float component5()+
Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute includedynamic range, perceived loudness, timbre, onset rate, and general entropy.
public java.lang.String component6()+
The Spotify ID for the track.
public float component7()+
Predicts whether a track contains no vocals.
“Ooh” and “aah” sounds aretreated as instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The closerthe instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.Values above 0.5 are intended to represent instrumental tracks, but confidence is higher asthe value approaches 1.0.
public int component8()+
The key the track is in.
Integers map to pitches using standard Pitch Class notation.E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
public float component9()+
Detects the presence of an audience in the recording.
Higher liveness values representan increased probability that the track was performed live. A value above 0.8 provides strong likelihoodthat the track is live.
public float component10()+
The overall loudness of a track in decibels
(dB). Loudness values are averaged acrossthe entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of asound that is the primary psychological correlate of physical strength (amplitude). Values typical rangebetween -60 and 0 db.
public int component11()+
Mode indicates the modality
(major or minor) of a track, the type of scale from whichits melodic content is derived. Major is represented by 1 and minor is 0.
public float component12()+
Speechiness detects the presence of spoken words in a track.
The more exclusivelyspeech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33and 0.66 describe tracks that may contain both music and speech, either in sections or layered, includingsuch cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.
public float component13()+
The overall estimated tempo of a track in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public int component14()+
An estimated overall time signature of a track.
The time signature (meter) is anotational convention to specify how many beats are in each bar (or measure).
public java.lang.String component15()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String component16()+
The object type
: “audio_features”
public float component18()+
A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with lowvalence sound more negative (e.g. sad, depressed, angry).
public AudioFeatures copy(float acousticness, + java.lang.String analysisUrl, + float danceability, + int durationMs, + float energy, + java.lang.String id, + float instrumentalness, + int key, + float liveness, + float loudness, + int mode, + float speechiness, + float tempo, + int timeSignature, + java.lang.String trackHref, + java.lang.String type, + java.lang.String _uri, + float valence)+
General attributes of a class Track
class Track
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioSection
+Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. +Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.*
Constructor and Description | +
---|
AudioSection(float start,
+ float duration,
+ float confidence,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ int timeSignature,
+ float timeSignatureConfidence)
+Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc.
+Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.*
+ |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+The starting point
+ |
+
float |
+component10()
+The confidence,
+ |
+
int |
+component11()
+An estimated overall time signature of a track.
+ |
+
float |
+component12()
+The confidence,
+ |
+
float |
+component2()
+The duration
+ |
+
float |
+component3()
+The confidence,
+ |
+
float |
+component4()
+The overall loudness of the section in decibels
+ |
+
float |
+component5()
+The overall estimated tempo of the section in beats per minute
+ |
+
float |
+component6()
+The confidence,
+ |
+
int |
+component7()
+The estimated overall key of the section.
+ |
+
float |
+component8()
+The confidence,
+ |
+
int |
+component9()
+Indicates the modality
+ |
+
AudioSection |
+copy(float start,
+ float duration,
+ float confidence,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ int timeSignature,
+ float timeSignatureConfidence)
+Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc.
+Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.*
+ |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getConfidence()
+The confidence,
+ |
+
float |
+getDuration()
+The duration
+ |
+
int |
+getKey()
+The estimated overall key of the section.
+ |
+
float |
+getKeyConfidence()
+The confidence,
+ |
+
float |
+getLoudness()
+The overall loudness of the section in decibels
+ |
+
int |
+getMode()
+Indicates the modality
+ |
+
float |
+getModeConfidence()
+The confidence,
+ |
+
float |
+getStart()
+The starting point
+ |
+
float |
+getTempo()
+The overall estimated tempo of the section in beats per minute
+ |
+
float |
+getTempoConfidence()
+The confidence,
+ |
+
int |
+getTimeSignature()
+An estimated overall time signature of a track.
+ |
+
float |
+getTimeSignatureConfidence()
+The confidence,
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioSection(float start, + float duration, + float confidence, + float loudness, + float tempo, + float tempoConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + int timeSignature, + float timeSignatureConfidence)+
Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. +Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.*
start
- The starting point (in seconds) of the section.duration
- The duration (in seconds) of the section.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the section’s “designation”.loudness
- The overall loudness of the section in decibels (dB). Loudness values are usefulfor comparing relative loudness of sections within tracks.tempo
- The overall estimated tempo of the section in beats per minute (BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.tempoConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempochanges or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.key
- The estimated overall key of the section. The values in this field ranging from 0 to 11 mapping topitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,the value is -1.keyConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the key.Songs with many key changes may correspond to low values in this field.mode
- Indicates the modality (major or minor) of a track, the type of scale from which its melodic content isderived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as bothkeys carry the same pitches.modeConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the mode.timeSignature
- An estimated overall time signature of a track. The time signature (meter) is a notationalconvention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7indicating time signatures of “3/4”, to “7/4”.timeSignatureConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the time_signature.Sections with time signature changes may correspond to low values in this field.public float getStart()+
The starting point
(in seconds) of the section.
public float getDuration()+
The duration
(in seconds) of the section.
public float getConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the section’s “designation”.
public float getLoudness()+
The overall loudness of the section in decibels
(dB). Loudness values are usefulfor comparing relative loudness of sections within tracks.
public float getTempo()+
The overall estimated tempo of the section in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public float getTempoConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempochanges or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.
public int getKey()+
The estimated overall key of the section.
The values in this field ranging from 0 to 11 mapping topitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,the value is -1.
public float getKeyConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the key.Songs with many key changes may correspond to low values in this field.
public int getMode()+
Indicates the modality
(major or minor) of a track, the type of scale from which its melodic content isderived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as bothkeys carry the same pitches.
public float getModeConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the mode.
public int getTimeSignature()+
An estimated overall time signature of a track.
The time signature (meter) is a notationalconvention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7indicating time signatures of “3/4”, to “7/4”.
public float getTimeSignatureConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the time_signature.Sections with time signature changes may correspond to low values in this field.
public float component1()+
The starting point
(in seconds) of the section.
public float component2()+
The duration
(in seconds) of the section.
public float component3()+
The confidence,
from 0.0 to 1.0, of the reliability of the section’s “designation”.
public float component4()+
The overall loudness of the section in decibels
(dB). Loudness values are usefulfor comparing relative loudness of sections within tracks.
public float component5()+
The overall estimated tempo of the section in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public float component6()+
The confidence,
from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempochanges or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.
public int component7()+
The estimated overall key of the section.
The values in this field ranging from 0 to 11 mapping topitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,the value is -1.
public float component8()+
The confidence,
from 0.0 to 1.0, of the reliability of the key.Songs with many key changes may correspond to low values in this field.
public int component9()+
Indicates the modality
(major or minor) of a track, the type of scale from which its melodic content isderived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as bothkeys carry the same pitches.
public float component10()+
The confidence,
from 0.0 to 1.0, of the reliability of the mode.
public int component11()+
An estimated overall time signature of a track.
The time signature (meter) is a notationalconvention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7indicating time signatures of “3/4”, to “7/4”.
public float component12()+
The confidence,
from 0.0 to 1.0, of the reliability of the time_signature.Sections with time signature changes may correspond to low values in this field.
public AudioSection copy(float start, + float duration, + float confidence, + float loudness, + float tempo, + float tempoConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + int timeSignature, + float timeSignatureConfidence)+
Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. +Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.*
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioSegment
+Audio segments attempts to subdivide a song into many segments, with each segment containing +a roughly consistent sound throughout its duration.
Constructor and Description | +
---|
AudioSegment(float start,
+ float duration,
+ float confidence,
+ float loudnessStart,
+ float loudnessMaxTime,
+ float loudnessMax,
+ java.lang.Float loudnessEnd,
+ java.util.List<java.lang.Float> pitches,
+ java.util.List<java.lang.Float> timbre)
+Audio segments attempts to subdivide a song into many segments, with each segment containing
+a roughly consistent sound throughout its duration.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+The starting point
+ |
+
float |
+component2()
+The duration
+ |
+
float |
+component3()
+The confidence,
+ |
+
float |
+component4()
+The onset loudness of the segment in decibels
+ |
+
float |
+component5()
+The segment-relative offset of the segment peak loudness in seconds.
+ |
+
float |
+component6()
+The peak loudness of the segment in decibels
+ |
+
java.lang.Float |
+component7()
+The offset loudness of the segment in decibels
+ |
+
java.util.List<java.lang.Float> |
+component8()
+A
+ |
+
java.util.List<java.lang.Float> |
+component9()
+Timbre is the quality of a musical note or sound that distinguishes different types of musical
+ |
+
AudioSegment |
+copy(float start,
+ float duration,
+ float confidence,
+ float loudnessStart,
+ float loudnessMaxTime,
+ float loudnessMax,
+ java.lang.Float loudnessEnd,
+ java.util.List<java.lang.Float> pitches,
+ java.util.List<java.lang.Float> timbre)
+Audio segments attempts to subdivide a song into many segments, with each segment containing
+a roughly consistent sound throughout its duration.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getConfidence()
+The confidence,
+ |
+
float |
+getDuration()
+The duration
+ |
+
java.lang.Float |
+getLoudnessEnd()
+The offset loudness of the segment in decibels
+ |
+
float |
+getLoudnessMax()
+The peak loudness of the segment in decibels
+ |
+
float |
+getLoudnessMaxTime()
+The segment-relative offset of the segment peak loudness in seconds.
+ |
+
float |
+getLoudnessStart()
+The onset loudness of the segment in decibels
+ |
+
java.util.List<java.lang.Float> |
+getPitches()
+A
+ |
+
float |
+getStart()
+The starting point
+ |
+
java.util.List<java.lang.Float> |
+getTimbre()
+Timbre is the quality of a musical note or sound that distinguishes different types of musical
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioSegment(float start, + float duration, + float confidence, + float loudnessStart, + float loudnessMaxTime, + float loudnessMax, + java.lang.Float loudnessEnd, + java.util.List<java.lang.Float> pitches, + java.util.List<java.lang.Float> timbre)+
Audio segments attempts to subdivide a song into many segments, with each segment containing +a roughly consistent sound throughout its duration.
start
- The starting point (in seconds) of the segment.duration
- The duration (in seconds) of the segment.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song whichare difficult to logically segment (e.g: noise) may correspond to low values in this field.loudnessStart
- The onset loudness of the segment in decibels (dB). Combined with loudness_max andloudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessMaxTime
- The segment-relative offset of the segment peak loudness in seconds. Combined withloudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.loudnessMax
- The peak loudness of the segment in decibels (dB). Combined with loudness_start andloudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessEnd
- The offset loudness of the segment in decibels (dB). This value should be equivalent to theloudness_start of the following segment.pitches
- A “chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classesC, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scaletimbre
- Timbre is the quality of a musical note or sound that distinguishes different types of musicalinstruments, or voices. Timbre vectors are best used in comparison with each other.public float getStart()+
The starting point
(in seconds) of the segment.
public float getDuration()+
The duration
(in seconds) of the segment.
public float getConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song whichare difficult to logically segment (e.g: noise) may correspond to low values in this field.
public float getLoudnessStart()+
The onset loudness of the segment in decibels
(dB). Combined with loudness_max andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public float getLoudnessMaxTime()+
The segment-relative offset of the segment peak loudness in seconds.
Combined withloudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.
public float getLoudnessMax()+
The peak loudness of the segment in decibels
(dB). Combined with loudness_start andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public java.lang.Float getLoudnessEnd()+
The offset loudness of the segment in decibels
(dB). This value should be equivalent to theloudness_start of the following segment.
public java.util.List<java.lang.Float> getPitches()+
A
“chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classesC, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale
public java.util.List<java.lang.Float> getTimbre()+
Timbre is the quality of a musical note or sound that distinguishes different types of musical
instruments, or voices. Timbre vectors are best used in comparison with each other.
public float component1()+
The starting point
(in seconds) of the segment.
public float component2()+
The duration
(in seconds) of the segment.
public float component3()+
The confidence,
from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song whichare difficult to logically segment (e.g: noise) may correspond to low values in this field.
public float component4()+
The onset loudness of the segment in decibels
(dB). Combined with loudness_max andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public float component5()+
The segment-relative offset of the segment peak loudness in seconds.
Combined withloudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.
public float component6()+
The peak loudness of the segment in decibels
(dB). Combined with loudness_start andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public java.lang.Float component7()+
The offset loudness of the segment in decibels
(dB). This value should be equivalent to theloudness_start of the following segment.
public java.util.List<java.lang.Float> component8()+
A
“chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classesC, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale
public java.util.List<java.lang.Float> component9()+
Timbre is the quality of a musical note or sound that distinguishes different types of musical
instruments, or voices. Timbre vectors are best used in comparison with each other.
public AudioSegment copy(float start, + float duration, + float confidence, + float loudnessStart, + float loudnessMaxTime, + float loudnessMax, + java.lang.Float loudnessEnd, + java.util.List<java.lang.Float> pitches, + java.util.List<java.lang.Float> timbre)+
Audio segments attempts to subdivide a song into many segments, with each segment containing +a roughly consistent sound throughout its duration.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AuthenticationError
+Constructor and Description | +
---|
AuthenticationError(java.lang.String error,
+ java.lang.String description) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
AuthenticationError |
+copy(java.lang.String error,
+ java.lang.String description) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getDescription() |
+
java.lang.String |
+getError() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AuthenticationError(java.lang.String error, + java.lang.String description)+
public java.lang.String getError()+
public java.lang.String getDescription()+
public java.lang.String component1()+
public java.lang.String component2()+
public AuthenticationError copy(java.lang.String error, + java.lang.String description)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class BadRequestException
+Thrown when a request fails
Constructor and Description | +
---|
BadRequestException(java.lang.String message,
+ java.lang.Integer statusCode)
+Thrown when a request fails
+ |
+
BadRequestException(ErrorObject error) |
+
BadRequestException(AuthenticationError authenticationError) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Integer |
+getStatusCode() |
+
public BadRequestException(java.lang.String message, + java.lang.Integer statusCode)+
Thrown when a request fails
public BadRequestException(ErrorObject error)+
public BadRequestException(AuthenticationError authenticationError)+
public class Context
+Puts an object in-context by linking to other related endpoints
Constructor and Description | +
---|
Context(java.util.Map<java.lang.String,java.lang.String> _externalUrls)
+Puts an object in-context by linking to other related endpoints
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Context |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls)
+Puts an object in-context by linking to other related endpoints
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.ExternalUrl> |
+getExternalUrls() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Context(java.util.Map<java.lang.String,java.lang.String> _externalUrls)+
Puts an object in-context by linking to other related endpoints
public java.util.List<com.adamratzman.spotify.models.ExternalUrl> getExternalUrls()+
public Context copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls)+
Puts an object in-context by linking to other related endpoints
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum CopyrightType +implements ResultEnum+
Copyright statement type of an Album
Enum Constant and Description | +
---|
COPYRIGHT |
+
SOUND_PERFORMANCE_COPYRIGHT |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getIdentifier() |
+
java.lang.String |
+retrieveIdentifier() |
+
retrieveIdentifier
public static CopyrightType COPYRIGHT+
public static CopyrightType SOUND_PERFORMANCE_COPYRIGHT+
public class CoreObject
+extends Identifiable
+Represents a core Spotify object such as a Track or Album
Constructor and Description | +
---|
CoreObject(java.lang.String _href,
+ java.lang.String _id,
+ SpotifyUri uri,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls)
+Represents a core Spotify object such as a Track or Album
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.ExternalUrl> |
+getExternalUrls()
+Known external URLs for this object
+ |
+
SpotifyUri |
+getUri()
+The URI associated with the object
+ |
+
getId
getHref, getId
public CoreObject(java.lang.String _href, + java.lang.String _id, + SpotifyUri uri, + java.util.Map<java.lang.String,java.lang.String> _externalUrls)+
Represents a core Spotify object such as a Track or Album
uri
- The URI associated with the objectpublic java.util.List<com.adamratzman.spotify.models.ExternalUrl> getExternalUrls()+
Known external URLs for this object
public SpotifyUri getUri()+
The URI associated with the object
public class CurrentlyPlayingContext
+Information about the current playback
Constructor and Description | +
---|
CurrentlyPlayingContext(long timestamp,
+ Device device,
+ java.lang.Integer progressMs,
+ boolean isPlaying,
+ Track track,
+ boolean shuffleState,
+ java.lang.String _repeatState,
+ Context context)
+Information about the current playback
+ |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+component1()
+Unix Millisecond Timestamp when data was fetched
+ |
+
Device |
+component2()
+The device that is currently active
+ |
+
java.lang.Integer |
+component3()
+Progress into the currently playing track.
+ |
+
boolean |
+component4()
+If something is currently playing.
+ |
+
Track |
+component5()
+The currently playing track.
+ |
+
boolean |
+component6()
+If shuffle is on or off
+ |
+
java.lang.String |
+component7() |
+
Context |
+component8()
+A Context Object.
+ |
+
CurrentlyPlayingContext |
+copy(long timestamp,
+ Device device,
+ java.lang.Integer progressMs,
+ boolean isPlaying,
+ Track track,
+ boolean shuffleState,
+ java.lang.String _repeatState,
+ Context context)
+Information about the current playback
+ |
+
boolean |
+equals(java.lang.Object p) |
+
Context |
+getContext()
+A Context Object.
+ |
+
Device |
+getDevice()
+The device that is currently active
+ |
+
java.lang.Integer |
+getProgressMs()
+Progress into the currently playing track.
+ |
+
RepeatState |
+getRepeatState()
+If and how the playback is repeating
+ |
+
boolean |
+getShuffleState()
+If shuffle is on or off
+ |
+
long |
+getTimestamp()
+Unix Millisecond Timestamp when data was fetched
+ |
+
Track |
+getTrack()
+The currently playing track.
+ |
+
java.lang.String |
+get_repeatState() |
+
int |
+hashCode() |
+
boolean |
+isPlaying()
+If something is currently playing.
+ |
+
java.lang.String |
+toString() |
+
public CurrentlyPlayingContext(long timestamp, + Device device, + java.lang.Integer progressMs, + boolean isPlaying, + Track track, + boolean shuffleState, + java.lang.String _repeatState, + Context context)+
Information about the current playback
timestamp
- Unix Millisecond Timestamp when data was fetcheddevice
- The device that is currently activeprogressMs
- Progress into the currently playing track. Can be null (e.g. If private session is enabled this will be null).isPlaying
- If something is currently playing.track
- The currently playing track. Can be null (e.g. If private session is enabled this will be null).shuffleState
- If shuffle is on or offcontext
- A Context Object. Can be null (e.g. If private session is enabled this will be null).public RepeatState getRepeatState()+
If and how the playback is repeating
public long getTimestamp()+
Unix Millisecond Timestamp when data was fetched
public Device getDevice()+
The device that is currently active
public java.lang.Integer getProgressMs()+
Progress into the currently playing track.
Can be null (e.g. If private session is enabled this will be null).
public boolean isPlaying()+
If something is currently playing.
public Track getTrack()+
The currently playing track.
Can be null (e.g. If private session is enabled this will be null).
public boolean getShuffleState()+
If shuffle is on or off
public java.lang.String get_repeatState()+
public Context getContext()+
A Context Object.
Can be null (e.g. If private session is enabled this will be null).
public long component1()+
Unix Millisecond Timestamp when data was fetched
public Device component2()+
The device that is currently active
public java.lang.Integer component3()+
Progress into the currently playing track.
Can be null (e.g. If private session is enabled this will be null).
public boolean component4()+
If something is currently playing.
public Track component5()+
The currently playing track.
Can be null (e.g. If private session is enabled this will be null).
public boolean component6()+
If shuffle is on or off
public java.lang.String component7()+
public Context component8()+
A Context Object.
Can be null (e.g. If private session is enabled this will be null).
public CurrentlyPlayingContext copy(long timestamp, + Device device, + java.lang.Integer progressMs, + boolean isPlaying, + Track track, + boolean shuffleState, + java.lang.String _repeatState, + Context context)+
Information about the current playback
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class CurrentlyPlayingObject
+Information about the currently playing track and context
Constructor and Description | +
---|
CurrentlyPlayingObject(PlayHistoryContext context,
+ long timestamp,
+ java.lang.Integer progressMs,
+ boolean isPlaying,
+ Track track,
+ java.lang.String _currentlyPlayingType,
+ PlaybackActions actions)
+Information about the currently playing track and context
+ |
+
Modifier and Type | +Method and Description | +
---|---|
PlayHistoryContext |
+component1()
+A Context Object.
+ |
+
long |
+component2()
+Unix Millisecond Timestamp when data was fetched
+ |
+
java.lang.Integer |
+component3()
+Progress into the currently playing track.
+ |
+
boolean |
+component4()
+If something is currently playing.
+ |
+
Track |
+component5()
+The currently playing track.
+ |
+
PlaybackActions |
+component7()
+Allows to update the user interface based on which playback actions are available within the current context
+ |
+
CurrentlyPlayingObject |
+copy(PlayHistoryContext context,
+ long timestamp,
+ java.lang.Integer progressMs,
+ boolean isPlaying,
+ Track track,
+ java.lang.String _currentlyPlayingType,
+ PlaybackActions actions)
+Information about the currently playing track and context
+ |
+
boolean |
+equals(java.lang.Object p) |
+
PlaybackActions |
+getActions()
+Allows to update the user interface based on which playback actions are available within the current context
+ |
+
PlayHistoryContext |
+getContext()
+A Context Object.
+ |
+
CurrentlyPlayingType |
+getCurrentlyPlayingType()
+The object type of the currently playing item. Can be one of track, episode, ad or unknown.
+ |
+
java.lang.Integer |
+getProgressMs()
+Progress into the currently playing track.
+ |
+
long |
+getTimestamp()
+Unix Millisecond Timestamp when data was fetched
+ |
+
Track |
+getTrack()
+The currently playing track.
+ |
+
int |
+hashCode() |
+
boolean |
+isPlaying()
+If something is currently playing.
+ |
+
java.lang.String |
+toString() |
+
public CurrentlyPlayingObject(PlayHistoryContext context, + long timestamp, + java.lang.Integer progressMs, + boolean isPlaying, + Track track, + java.lang.String _currentlyPlayingType, + PlaybackActions actions)+
Information about the currently playing track and context
context
- A Context Object. Can be null.timestamp
- Unix Millisecond Timestamp when data was fetchedprogressMs
- Progress into the currently playing track. Can be null.isPlaying
- If something is currently playing.track
- The currently playing track. Can be null.actions
- Allows to update the user interface based on which playback actions are available within the current contextpublic CurrentlyPlayingType getCurrentlyPlayingType()+
The object type of the currently playing item. Can be one of track, episode, ad or unknown.
public PlayHistoryContext getContext()+
A Context Object.
Can be null.
public long getTimestamp()+
Unix Millisecond Timestamp when data was fetched
public java.lang.Integer getProgressMs()+
Progress into the currently playing track.
Can be null.
public boolean isPlaying()+
If something is currently playing.
public Track getTrack()+
The currently playing track.
Can be null.
public PlaybackActions getActions()+
Allows to update the user interface based on which playback actions are available within the current context
public PlayHistoryContext component1()+
A Context Object.
Can be null.
public long component2()+
Unix Millisecond Timestamp when data was fetched
public java.lang.Integer component3()+
Progress into the currently playing track.
Can be null.
public boolean component4()+
If something is currently playing.
public Track component5()+
The currently playing track.
Can be null.
public PlaybackActions component7()+
Allows to update the user interface based on which playback actions are available within the current context
public CurrentlyPlayingObject copy(PlayHistoryContext context, + long timestamp, + java.lang.Integer progressMs, + boolean isPlaying, + Track track, + java.lang.String _currentlyPlayingType, + PlaybackActions actions)+
Information about the currently playing track and context
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum CurrentlyPlayingType +implements ResultEnum+
The object type of the currently playing item
Enum Constant and Description | +
---|
AD |
+
EPISODE |
+
TRACK |
+
UNKNOWN |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getIdentifier() |
+
java.lang.String |
+retrieveIdentifier() |
+
retrieveIdentifier
public static CurrentlyPlayingType TRACK+
public static CurrentlyPlayingType EPISODE+
public static CurrentlyPlayingType AD+
public static CurrentlyPlayingType UNKNOWN+
public class Cursor
+The cursor to use as key to find the next (or previous) page of items.
Constructor and Description | +
---|
Cursor(java.lang.String before,
+ java.lang.String after)
+The cursor to use as key to find the next (or previous) page of items.
+ |
+
Cursor()
+The cursor to use as key to find the next (or previous) page of items.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The cursor to use as key to find the previous page of items.
+ |
+
java.lang.String |
+component2()
+The cursor to use as key to find the next page of items.
+ |
+
Cursor |
+copy(java.lang.String before,
+ java.lang.String after)
+The cursor to use as key to find the next (or previous) page of items.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAfter()
+The cursor to use as key to find the next page of items.
+ |
+
java.lang.String |
+getBefore()
+The cursor to use as key to find the previous page of items.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Cursor(java.lang.String before, + java.lang.String after)+
The cursor to use as key to find the next (or previous) page of items.
before
- The cursor to use as key to find the previous page of items.after
- The cursor to use as key to find the next page of items.public Cursor()+
The cursor to use as key to find the next (or previous) page of items.
public java.lang.String getBefore()+
The cursor to use as key to find the previous page of items.
public java.lang.String getAfter()+
The cursor to use as key to find the next page of items.
public java.lang.String component1()+
The cursor to use as key to find the previous page of items.
public java.lang.String component2()+
The cursor to use as key to find the next page of items.
public Cursor copy(java.lang.String before, + java.lang.String after)+
The cursor to use as key to find the next (or previous) page of items.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class CursorBasedPagingObject<T>
+extends AbstractPagingObject
+The cursor-based paging object is a container for a set of objects. It contains a key called +items (whose value is an array of the requested objects) along with other keys like next and +cursors that can be useful in future calls.
itemClazz
Constructor and Description | +
---|
CursorBasedPagingObject(java.lang.String href,
+ java.util.List<? extends T> items,
+ int limit,
+ java.lang.String next,
+ Cursor cursor,
+ int total)
+The cursor-based paging object is a container for a set of objects. It contains a key called
+items (whose value is an array of the requested objects) along with other keys like next and
+cursors that can be useful in future calls.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.sequences.Sequence> |
+getAll()
+Get all CursorBasedPagingObjects associated with the request
+ |
+
kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> |
+getAllImpl$module() |
+
SpotifyRestAction<java.util.List> |
+getAllItems()
+Get all items of type T associated with the request
+ |
+
Cursor |
+getCursor()
+The cursors used to find the next set of items..
+ |
+
AbstractPagingObject<T> |
+getImpl$module(PagingTraversalType type) |
+
SpotifyRestAction<com.adamratzman.spotify.models.CursorBasedPagingObject> |
+getNext()
+Get the next set of T items
+ |
+
getHref, getItemClazz, getItems, getLimit, getNext, getOffset, getPrevious, getTotal, setItemClazz
public CursorBasedPagingObject(java.lang.String href, + java.util.List<? extends T> items, + int limit, + java.lang.String next, + Cursor cursor, + int total)+
The cursor-based paging object is a container for a set of objects. It contains a key called +items (whose value is an array of the requested objects) along with other keys like next and +cursors that can be useful in future calls.
cursor
- The cursors used to find the next set of items..public SpotifyRestAction<com.adamratzman.spotify.models.CursorBasedPagingObject> getNext()+
Get the next set of T items
public SpotifyRestAction<kotlin.sequences.Sequence> getAll()+
Get all CursorBasedPagingObjects associated with the request
public SpotifyRestAction<java.util.List> getAllItems()+
Get all items of type T associated with the request
public AbstractPagingObject<T> getImpl$module(PagingTraversalType type)+
public kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> getAllImpl$module()+
public Cursor getCursor()+
The cursors used to find the next set of items..
public class Device
+extends IdentifiableNullable
+A device which is connected to the Spotify user
Constructor and Description | +
---|
Device(java.lang.String _id,
+ boolean isActive,
+ boolean isPrivateSession,
+ boolean isRestricted,
+ java.lang.String name,
+ java.lang.String _type,
+ int volumePercent,
+ DeviceType type)
+A device which is connected to the Spotify user
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+component2()
+If this device is the currently active device.
+ |
+
boolean |
+component3()
+If this device is currently in a private session.
+ |
+
boolean |
+component4()
+Whether controlling this device is restricted.
+ |
+
java.lang.String |
+component5()
+The name of the device.
+ |
+
java.lang.String |
+component6() |
+
int |
+component7() |
+
DeviceType |
+component8()
+Device type,
+ |
+
Device |
+copy(java.lang.String _id,
+ boolean isActive,
+ boolean isPrivateSession,
+ boolean isRestricted,
+ java.lang.String name,
+ java.lang.String _type,
+ int volumePercent,
+ DeviceType type)
+A device which is connected to the Spotify user
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getName()
+The name of the device.
+ |
+
DeviceType |
+getType()
+Device type,
+ |
+
int |
+getVolumePercent() |
+
java.lang.String |
+get_type() |
+
int |
+hashCode() |
+
boolean |
+isActive()
+If this device is the currently active device.
+ |
+
boolean |
+isPrivateSession()
+If this device is currently in a private session.
+ |
+
boolean |
+isRestricted()
+Whether controlling this device is restricted.
+ |
+
java.lang.String |
+toString() |
+
getHref, getId
public Device(java.lang.String _id, + boolean isActive, + boolean isPrivateSession, + boolean isRestricted, + java.lang.String name, + java.lang.String _type, + int volumePercent, + DeviceType type)+
A device which is connected to the Spotify user
isActive
- If this device is the currently active device.isPrivateSession
- If this device is currently in a private session.isRestricted
- Whether controlling this device is restricted. At presentif this is “true” then no Web API commands will be accepted by this device.name
- The name of the device.type
- Device type, such as “Computer”, “Smartphone” or “Speaker”.public boolean isActive()+
If this device is the currently active device.
public boolean isPrivateSession()+
If this device is currently in a private session.
public boolean isRestricted()+
Whether controlling this device is restricted.
At presentif this is “true” then no Web API commands will be accepted by this device.
public java.lang.String getName()+
The name of the device.
public java.lang.String get_type()+
public int getVolumePercent()+
public DeviceType getType()+
Device type,
such as “Computer”, “Smartphone” or “Speaker”.
public boolean component2()+
If this device is the currently active device.
public boolean component3()+
If this device is currently in a private session.
public boolean component4()+
Whether controlling this device is restricted.
At presentif this is “true” then no Web API commands will be accepted by this device.
public java.lang.String component5()+
The name of the device.
public java.lang.String component6()+
public int component7()+
public DeviceType component8()+
Device type,
such as “Computer”, “Smartphone” or “Speaker”.
public Device copy(java.lang.String _id, + boolean isActive, + boolean isPrivateSession, + boolean isRestricted, + java.lang.String name, + java.lang.String _type, + int volumePercent, + DeviceType type)+
A device which is connected to the Spotify user
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum DeviceType
+Electronic type of registered Spotify device
Enum Constant and Description | +
---|
AUDIO_DONGLE |
+
AUTOMOBILE |
+
AVR |
+
CAST_AUDIO |
+
CAST_VIDEO |
+
COMPUTER |
+
GAME_CONSOLE |
+
SMARTPHONE |
+
SPEAKER |
+
STB |
+
TABLET |
+
TV |
+
UNKNOWN |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getIdentifier()
+readable name
+ |
+
public static DeviceType COMPUTER+
public static DeviceType TABLET+
public static DeviceType SMARTPHONE+
public static DeviceType SPEAKER+
public static DeviceType TV+
public static DeviceType AVR+
public static DeviceType STB+
public static DeviceType AUDIO_DONGLE+
public static DeviceType GAME_CONSOLE+
public static DeviceType CAST_VIDEO+
public static DeviceType CAST_AUDIO+
public static DeviceType AUTOMOBILE+
public static DeviceType UNKNOWN+
public class DisallowablePlaybackAction
+Maps a playback action to whether the user is disallowed from doing it
Constructor and Description | +
---|
DisallowablePlaybackAction(PlaybackAction action,
+ boolean disallowed)
+Maps a playback action to whether the user is disallowed from doing it
+ |
+
Modifier and Type | +Method and Description | +
---|---|
PlaybackAction |
+component1()
+The
+ |
+
boolean |
+component2()
+Whether the action is not allowed.
+ |
+
DisallowablePlaybackAction |
+copy(PlaybackAction action,
+ boolean disallowed)
+Maps a playback action to whether the user is disallowed from doing it
+ |
+
boolean |
+equals(java.lang.Object p) |
+
PlaybackAction |
+getAction()
+The
+ |
+
boolean |
+getDisallowed()
+Whether the action is not allowed.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public DisallowablePlaybackAction(PlaybackAction action, + boolean disallowed)+
Maps a playback action to whether the user is disallowed from doing it
action
- The enum PlaybackAction
for which the explicit setting is provideddisallowed
- Whether the action is not allowed.public PlaybackAction getAction()+
The
enum PlaybackAction
for which the explicit setting is provided
enum PlaybackAction
public boolean getDisallowed()+
Whether the action is not allowed.
public PlaybackAction component1()+
The
enum PlaybackAction
for which the explicit setting is provided
enum PlaybackAction
public boolean component2()+
Whether the action is not allowed.
public DisallowablePlaybackAction copy(PlaybackAction action, + boolean disallowed)+
Maps a playback action to whether the user is disallowed from doing it
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ErrorObject
+An endpoint exception from Spotify
Constructor and Description | +
---|
ErrorObject(int status,
+ java.lang.String message)
+An endpoint exception from Spotify
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component1()
+The HTTP status code
+ |
+
java.lang.String |
+component2()
+A short description of the cause of the error.
+ |
+
ErrorObject |
+copy(int status,
+ java.lang.String message)
+An endpoint exception from Spotify
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getMessage()
+A short description of the cause of the error.
+ |
+
int |
+getStatus()
+The HTTP status code
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public ErrorObject(int status, + java.lang.String message)+
An endpoint exception from Spotify
status
- The HTTP status codemessage
- A short description of the cause of the error.public int getStatus()+
The HTTP status code
public java.lang.String getMessage()+
A short description of the cause of the error.
public int component1()+
The HTTP status code
public java.lang.String component2()+
A short description of the cause of the error.
public ErrorObject copy(int status, + java.lang.String message)+
An endpoint exception from Spotify
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ErrorResponse
+Wraps around class ErrorObject
class ErrorObject
Constructor and Description | +
---|
ErrorResponse(ErrorObject error)
+Wraps around
+class ErrorObject |
+
Modifier and Type | +Method and Description | +
---|---|
ErrorObject |
+component1() |
+
ErrorResponse |
+copy(ErrorObject error)
+Wraps around
+class ErrorObject |
+
boolean |
+equals(java.lang.Object p) |
+
ErrorObject |
+getError() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public ErrorResponse(ErrorObject error)+
Wraps around class ErrorObject
class ErrorObject
public ErrorObject getError()+
public ErrorObject component1()+
public ErrorResponse copy(ErrorObject error)+
Wraps around class ErrorObject
class ErrorObject
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ExternalId
+An external id linked to the result object
Constructor and Description | +
---|
ExternalId(java.lang.String key,
+ java.lang.String id)
+An external id linked to the result object
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getId()
+An external identifier for the object.
+ |
+
java.lang.String |
+getKey()
+The identifier type,
+ |
+
public class ExternalUrl
+Constructor and Description | +
---|
ExternalUrl(java.lang.String name,
+ java.lang.String url) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getName() |
+
java.lang.String |
+getUrl() |
+
public class FeaturedPlaylists
+Spotify featured playlists (on the Browse tab)
Constructor and Description | +
---|
FeaturedPlaylists(java.lang.String message,
+ PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)
+Spotify featured playlists (on the Browse tab)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+the featured message in
+ |
+
PagingObject<com.adamratzman.spotify.models.SimplePlaylist> |
+component2()
+
+ |
+
FeaturedPlaylists |
+copy(java.lang.String message,
+ PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)
+Spotify featured playlists (on the Browse tab)
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getMessage()
+the featured message in
+ |
+
PagingObject<com.adamratzman.spotify.models.SimplePlaylist> |
+getPlaylists()
+
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public FeaturedPlaylists(java.lang.String message, + PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)+
Spotify featured playlists (on the Browse tab)
message
- the featured message in "Overview"playlists
- class PagingObject
of returned itemspublic java.lang.String getMessage()+
the featured message in
"Overview"
public PagingObject<com.adamratzman.spotify.models.SimplePlaylist> getPlaylists()+
of returned items
class PagingObject
public java.lang.String component1()+
the featured message in
"Overview"
public PagingObject<com.adamratzman.spotify.models.SimplePlaylist> component2()+
of returned items
class PagingObject
public FeaturedPlaylists copy(java.lang.String message, + PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)+
Spotify featured playlists (on the Browse tab)
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Followers
+Information about a Spotify user's followers
Constructor and Description | +
---|
Followers(java.lang.String href,
+ int _total,
+ int total)
+Information about a Spotify user's followers
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+Will always be null,
+ |
+
int |
+component3()
+-1 if the user object does not contain followers,
+ |
+
Followers |
+copy(java.lang.String href,
+ int _total,
+ int total)
+Information about a Spotify user's followers
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getHref()
+Will always be null,
+ |
+
int |
+getTotal()
+-1 if the user object does not contain followers,
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Followers(java.lang.String href, + int _total, + int total)+
Information about a Spotify user's followers
href
- Will always be null, per the Spotify documentation,until the Web API is updated to support this.total
- -1 if the user object does not contain followers, otherwise the amount of followers the user haspublic java.lang.String getHref()+
Will always be null,
per the Spotify documentation,until the Web API is updated to support this.
public int getTotal()+
-1 if the user object does not contain followers,
otherwise the amount of followers the user has
public java.lang.String component1()+
Will always be null,
per the Spotify documentation,until the Web API is updated to support this.
public int component3()+
-1 if the user object does not contain followers,
otherwise the amount of followers the user has
public Followers copy(java.lang.String href, + int _total, + int total)+
Information about a Spotify user's followers
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Identifiable
+extends IdentifiableNullable
+Represents an identifiable Spotify object such as an Album or Recommendation Seed
Constructor and Description | +
---|
Identifiable(java.lang.String href,
+ java.lang.String id)
+Represents an identifiable Spotify object such as an Album or Recommendation Seed
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getId()
+The Spotify id of the associated object
+ |
+
getHref, getId
public class IdentifiableNullable
+extends NeedsApi
+Represents an identifiable Spotify object such as an Album or Recommendation Seed
Constructor and Description | +
---|
IdentifiableNullable(java.lang.String href,
+ java.lang.String id)
+Represents an identifiable Spotify object such as an Album or Recommendation Seed
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getHref()
+A link to the Spotify web api endpoint associated with this request
+ |
+
java.lang.String |
+getId()
+The Spotify id of the associated object
+ |
+
public IdentifiableNullable(java.lang.String href, + java.lang.String id)+
Represents an identifiable Spotify object such as an Album or Recommendation Seed
href
- A link to the Spotify web api endpoint associated with this requestid
- The Spotify id of the associated objectpublic class Linkable
+Allow for track relinking
Modifier and Type | +Field and Description | +
---|---|
SpotifyAPI |
+api |
+
Constructor and Description | +
---|
Linkable()
+Allow for track relinking
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyAPI |
+getApi() |
+
void |
+setApi(SpotifyAPI p) |
+
public SpotifyAPI api+
public SpotifyAPI getApi()+
public void setApi(SpotifyAPI p)+
public class LinkedTrack
+extends CoreObject
+Represents a relinked track. This is playable in the +searched market. If null, the API result is playable in the market.
Constructor and Description | +
---|
LinkedTrack(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String type)
+Represents a relinked track. This is playable in the
+searched market. If null, the API result is playable in the market.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.Map<java.lang.String,java.lang.String> |
+component1() |
+
java.lang.String |
+component5()
+The object type
+ |
+
LinkedTrack |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String type)
+Represents a relinked track. This is playable in the
+searched market. If null, the API result is playable in the market.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getType()
+The object type
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+get_externalUrls() |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Track> |
+toFullTrack(com.neovisionaries.i18n.CountryCode market)
+Retrieves the full
+class Track object associated with this class LinkedTrack with the given market |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public LinkedTrack(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String type)+
Represents a relinked track. This is playable in the +searched market. If null, the API result is playable in the market.
type
- The object type: “track”.public SpotifyRestAction<com.adamratzman.spotify.models.Track> toFullTrack(com.neovisionaries.i18n.CountryCode market)+
Retrieves the full class Track
object associated with this class LinkedTrack
with the given market
market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.class Track
,
+class LinkedTrack
public java.util.Map<java.lang.String,java.lang.String> get_externalUrls()+
public java.lang.String getType()+
The object type
: “track”.
public java.util.Map<java.lang.String,java.lang.String> component1()+
public java.lang.String component5()+
The object type
: “track”.
public LinkedTrack copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String type)+
Represents a relinked track. This is playable in the +searched market. If null, the API result is playable in the market.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class LocalTrackURI
+extends SpotifyUri
+Represents a Spotify local track URI
Constructor and Description | +
---|
LocalTrackURI(java.lang.String input)
+Represents a Spotify local track URI
+ |
+
public enum Market
+Represents Spotify markets (countries + distinctive territories)
Enum Constant and Description | +
---|
AD |
+
AE |
+
AF |
+
AG |
+
AL |
+
AM |
+
AO |
+
AR |
+
AT |
+
AU |
+
AW |
+
AZ |
+
BA |
+
BB |
+
BD |
+
BE |
+
BF |
+
BG |
+
BH |
+
BI |
+
BJ |
+
BM |
+
BN |
+
BO |
+
BR |
+
BS |
+
BT |
+
BW |
+
BY |
+
BZ |
+
CA |
+
CD |
+
CF |
+
CG |
+
CH |
+
CI |
+
CL |
+
CM |
+
CN |
+
CO |
+
CR |
+
CV |
+
CY |
+
CZ |
+
DE |
+
DJ |
+
DK |
+
DM |
+
DO |
+
DZ |
+
EC |
+
EE |
+
EG |
+
ER |
+
ES |
+
ET |
+
FI |
+
FJ |
+
FK |
+
FM |
+
FR |
+
GA |
+
GB |
+
GD |
+
GE |
+
GF |
+
GH |
+
GL |
+
GM |
+
GN |
+
GP |
+
GQ |
+
GR |
+
GS |
+
GT |
+
GW |
+
GY |
+
HK |
+
HN |
+
HR |
+
HT |
+
HU |
+
ID |
+
IE |
+
IL |
+
IN |
+
IQ |
+
IR |
+
IS |
+
IT |
+
JM |
+
JO |
+
JP |
+
KE |
+
KG |
+
KH |
+
KI |
+
KM |
+
KN |
+
KR |
+
KW |
+
KZ |
+
LA |
+
LB |
+
LC |
+
LI |
+
LK |
+
LR |
+
LS |
+
LT |
+
LU |
+
LV |
+
LY |
+
MA |
+
MC |
+
MD |
+
ME |
+
MG |
+
MH |
+
MK |
+
ML |
+
MM |
+
MN |
+
MO |
+
MP |
+
MR |
+
MT |
+
MU |
+
MV |
+
MW |
+
MX |
+
MY |
+
MZ |
+
NA |
+
NE |
+
NG |
+
NI |
+
NL |
+
NO |
+
NP |
+
NR |
+
NZ |
+
OM |
+
PA |
+
PE |
+
PG |
+
PH |
+
PK |
+
PL |
+
PR |
+
PT |
+
PW |
+
PY |
+
QA |
+
RO |
+
RS |
+
RU |
+
RW |
+
SA |
+
SB |
+
SC |
+
SD |
+
SE |
+
SG |
+
SI |
+
SK |
+
SL |
+
SM |
+
SN |
+
SO |
+
SR |
+
SS |
+
ST |
+
SV |
+
SY |
+
SZ |
+
TD |
+
TG |
+
TH |
+
TJ |
+
TL |
+
TM |
+
TN |
+
TO |
+
TR |
+
TT |
+
TV |
+
TW |
+
TZ |
+
UA |
+
UG |
+
US |
+
UY |
+
UZ |
+
VA |
+
VC |
+
VE |
+
VN |
+
VU |
+
WS |
+
YE |
+
ZA |
+
ZM |
+
ZW |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getCode() |
+
java.lang.String |
+getCountry()
+the readable country/territory name of the market
+ |
+
public static Market AD+
public static Market AE+
public static Market AF+
public static Market AG+
public static Market AL+
public static Market AM+
public static Market AO+
public static Market AR+
public static Market AT+
public static Market AU+
public static Market AW+
public static Market AZ+
public static Market BA+
public static Market BB+
public static Market BD+
public static Market BE+
public static Market BF+
public static Market BG+
public static Market BH+
public static Market BI+
public static Market BJ+
public static Market BM+
public static Market BN+
public static Market BO+
public static Market BR+
public static Market BS+
public static Market BT+
public static Market BW+
public static Market BY+
public static Market BZ+
public static Market CA+
public static Market CD+
public static Market CF+
public static Market CG+
public static Market CH+
public static Market CI+
public static Market CL+
public static Market CM+
public static Market CN+
public static Market CO+
public static Market CR+
public static Market CV+
public static Market CY+
public static Market CZ+
public static Market DE+
public static Market DJ+
public static Market DK+
public static Market DM+
public static Market DO+
public static Market DZ+
public static Market EC+
public static Market EE+
public static Market EG+
public static Market ER+
public static Market ES+
public static Market ET+
public static Market FI+
public static Market FJ+
public static Market FK+
public static Market FM+
public static Market FR+
public static Market GA+
public static Market GB+
public static Market GD+
public static Market GE+
public static Market GF+
public static Market GH+
public static Market GL+
public static Market GM+
public static Market GN+
public static Market GP+
public static Market GQ+
public static Market GR+
public static Market GS+
public static Market GT+
public static Market GW+
public static Market GY+
public static Market HK+
public static Market HN+
public static Market HR+
public static Market HT+
public static Market HU+
public static Market ID+
public static Market IE+
public static Market IL+
public static Market IN+
public static Market IQ+
public static Market IR+
public static Market IS+
public static Market IT+
public static Market JM+
public static Market JO+
public static Market JP+
public static Market KE+
public static Market KG+
public static Market KH+
public static Market KI+
public static Market KM+
public static Market KN+
public static Market KR+
public static Market KW+
public static Market KZ+
public static Market LA+
public static Market LB+
public static Market LC+
public static Market LI+
public static Market LK+
public static Market LR+
public static Market LS+
public static Market LT+
public static Market LU+
public static Market LV+
public static Market LY+
public static Market MA+
public static Market MC+
public static Market MD+
public static Market ME+
public static Market MG+
public static Market MH+
public static Market MK+
public static Market ML+
public static Market MM+
public static Market MN+
public static Market MO+
public static Market MP+
public static Market MR+
public static Market MT+
public static Market MU+
public static Market MV+
public static Market MW+
public static Market MX+
public static Market MY+
public static Market MZ+
public static Market NA+
public static Market NE+
public static Market NG+
public static Market NI+
public static Market NL+
public static Market NO+
public static Market NP+
public static Market NR+
public static Market NZ+
public static Market OM+
public static Market PA+
public static Market PE+
public static Market PG+
public static Market PH+
public static Market PK+
public static Market PL+
public static Market PR+
public static Market PT+
public static Market PW+
public static Market PY+
public static Market QA+
public static Market RO+
public static Market RS+
public static Market RU+
public static Market RW+
public static Market SA+
public static Market SB+
public static Market SC+
public static Market SD+
public static Market SE+
public static Market SG+
public static Market SI+
public static Market SK+
public static Market SL+
public static Market SM+
public static Market SN+
public static Market SO+
public static Market SR+
public static Market SS+
public static Market ST+
public static Market SV+
public static Market SY+
public static Market SZ+
public static Market TD+
public static Market TG+
public static Market TH+
public static Market TJ+
public static Market TL+
public static Market TM+
public static Market TN+
public static Market TO+
public static Market TR+
public static Market TT+
public static Market TV+
public static Market TW+
public static Market TZ+
public static Market UA+
public static Market UG+
public static Market US+
public static Market UY+
public static Market UZ+
public static Market VA+
public static Market VC+
public static Market VE+
public static Market VN+
public static Market VU+
public static Market WS+
public static Market YE+
public static Market ZA+
public static Market ZM+
public static Market ZW+
public class NeedsApi
+Provide access to the underlying class SpotifyAPI
class SpotifyAPI
Modifier and Type | +Field and Description | +
---|---|
SpotifyAPI |
+api
+The API client associated with the request
+ |
+
Constructor and Description | +
---|
NeedsApi()
+Provide access to the underlying
+class SpotifyAPI |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyAPI |
+getApi()
+The API client associated with the request
+ |
+
void |
+setApi(SpotifyAPI p)
+The API client associated with the request
+ |
+
public SpotifyAPI api+
The API client associated with the request
public NeedsApi()+
Provide access to the underlying class SpotifyAPI
class SpotifyAPI
public SpotifyAPI getApi()+
The API client associated with the request
public void setApi(SpotifyAPI p)+
The API client associated with the request
public class PagingObject<T>
+extends AbstractPagingObject
+The offset-based paging object is a container for a set of objects. It contains a key called items +(whose value is an array of the requested objects) along with other keys like previous, next and +limit that can be useful in future calls.
itemClazz
Constructor and Description | +
---|
PagingObject(java.lang.String href,
+ java.util.List<? extends T> items,
+ int limit,
+ java.lang.String next,
+ int offset,
+ java.lang.String previous,
+ int total)
+The offset-based paging object is a container for a set of objects. It contains a key called items
+(whose value is an array of the requested objects) along with other keys like previous, next and
+limit that can be useful in future calls.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<java.util.List> |
+getAll()
+Get all PagingObjects associated with the request
+ |
+
kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> |
+getAllImpl$module() |
+
SpotifyRestAction<java.util.List> |
+getAllItems()
+Get all items of type T associated with the request
+ |
+
AbstractPagingObject<T> |
+getImpl$module(PagingTraversalType type) |
+
SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> |
+getNext()
+Get the next set of T items
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> |
+getPrevious()
+Get the previous set of T items
+ |
+
getHref, getItemClazz, getItems, getLimit, getNext, getOffset, getPrevious, getTotal, setItemClazz
public PagingObject(java.lang.String href, + java.util.List<? extends T> items, + int limit, + java.lang.String next, + int offset, + java.lang.String previous, + int total)+
The offset-based paging object is a container for a set of objects. It contains a key called items +(whose value is an array of the requested objects) along with other keys like previous, next and +limit that can be useful in future calls.
public SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> getNext()+
Get the next set of T items
public SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> getPrevious()+
Get the previous set of T items
public AbstractPagingObject<T> getImpl$module(PagingTraversalType type)+
public kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> getAllImpl$module()+
public SpotifyRestAction<java.util.List> getAll()+
Get all PagingObjects associated with the request
public SpotifyRestAction<java.util.List> getAllItems()+
Get all items of type T associated with the request
public class PagingObjectsKt
+public enum PagingTraversalType
+public static PagingTraversalType BACKWARDS+
public static PagingTraversalType FORWARDS+
public class PlayHistory
+Information about a previously-played track
Constructor and Description | +
---|
PlayHistory(SimpleTrack track,
+ java.lang.String playedAt,
+ PlayHistoryContext context)
+Information about a previously-played track
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SimpleTrack |
+component1()
+The track the user listened to.
+ |
+
java.lang.String |
+component2()
+The date and time the track was played.
+ |
+
PlayHistoryContext |
+component3()
+The context the track was played from.
+ |
+
PlayHistory |
+copy(SimpleTrack track,
+ java.lang.String playedAt,
+ PlayHistoryContext context)
+Information about a previously-played track
+ |
+
boolean |
+equals(java.lang.Object p) |
+
PlayHistoryContext |
+getContext()
+The context the track was played from.
+ |
+
java.lang.String |
+getPlayedAt()
+The date and time the track was played.
+ |
+
SimpleTrack |
+getTrack()
+The track the user listened to.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public PlayHistory(SimpleTrack track, + java.lang.String playedAt, + PlayHistoryContext context)+
Information about a previously-played track
track
- The track the user listened to.playedAt
- The date and time the track was played.context
- The context the track was played from.public SimpleTrack getTrack()+
The track the user listened to.
public java.lang.String getPlayedAt()+
The date and time the track was played.
public PlayHistoryContext getContext()+
The context the track was played from.
public SimpleTrack component1()+
The track the user listened to.
public java.lang.String component2()+
The date and time the track was played.
public PlayHistoryContext component3()+
The context the track was played from.
public PlayHistory copy(SimpleTrack track, + java.lang.String playedAt, + PlayHistoryContext context)+
Information about a previously-played track
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlayHistoryContext
+extends CoreObject
+Context in which a track was played
Constructor and Description | +
---|
PlayHistoryContext(java.lang.String _href,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _uri,
+ java.lang.String type)
+Context in which a track was played
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component4()
+The object type,
+ |
+
PlayHistoryContext |
+copy(java.lang.String _href,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _uri,
+ java.lang.String type)
+Context in which a track was played
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getType()
+The object type,
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public PlayHistoryContext(java.lang.String _href, + java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _uri, + java.lang.String type)+
Context in which a track was played
type
- The object type, e.g. “artist”, “playlist”, “album”.public java.lang.String getType()+
The object type,
e.g. “artist”, “playlist”, “album”.
public java.lang.String component4()+
The object type,
e.g. “artist”, “playlist”, “album”.
public PlayHistoryContext copy(java.lang.String _href, + java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _uri, + java.lang.String type)+
Context in which a track was played
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum PlaybackAction +implements ResultEnum+
Action a user takes that will affect current playback
Enum Constant and Description | +
---|
INTERRUPTING_PLAYBACK |
+
PAUSING |
+
PLAYING |
+
RESUMING |
+
SEEKING |
+
SKIPPING_NEXT |
+
SKIPPING_PREV |
+
STOPPING |
+
TOGGLING_REPEAT_CONTEXT |
+
TOGGLING_REPEAT_TRACK |
+
TOGGLING_SHUFFLE |
+
TRANSFERRING_PLAYBACK |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+retrieveIdentifier() |
+
retrieveIdentifier
public static PlaybackAction INTERRUPTING_PLAYBACK+
public static PlaybackAction PAUSING+
public static PlaybackAction PLAYING+
public static PlaybackAction RESUMING+
public static PlaybackAction SEEKING+
public static PlaybackAction SKIPPING_NEXT+
public static PlaybackAction SKIPPING_PREV+
public static PlaybackAction STOPPING+
public static PlaybackAction TOGGLING_REPEAT_CONTEXT+
public static PlaybackAction TOGGLING_SHUFFLE+
public static PlaybackAction TOGGLING_REPEAT_TRACK+
public static PlaybackAction TRANSFERRING_PLAYBACK+
public class PlaybackActions
+List of playback actions (pause, resume, etc) which a user is disallowed or allowed to do. Playback actions
+NOT in PlaybackActions.getDisallows
are allowed.
PlaybackActions.getDisallows
Constructor and Description | +
---|
PlaybackActions(java.util.Map<java.lang.String,java.lang.Boolean> _disallows)
+List of playback actions (pause, resume, etc) which a user is disallowed or allowed to do. Playback actions
+NOT in
+PlaybackActions.getDisallows are allowed. |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.Map<java.lang.String,java.lang.Boolean> |
+component1() |
+
PlaybackActions |
+copy(java.util.Map<java.lang.String,java.lang.Boolean> _disallows)
+List of playback actions (pause, resume, etc) which a user is disallowed or allowed to do. Playback actions
+NOT in
+PlaybackActions.getDisallows are allowed. |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.DisallowablePlaybackAction> |
+getDisallows()
+A list of
+class DisallowablePlaybackAction that have an explicit setting |
+
java.util.Map<java.lang.String,java.lang.Boolean> |
+get_disallows() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public PlaybackActions(java.util.Map<java.lang.String,java.lang.Boolean> _disallows)+
List of playback actions (pause, resume, etc) which a user is disallowed or allowed to do. Playback actions
+NOT in PlaybackActions.getDisallows
are allowed.
PlaybackActions.getDisallows
public java.util.List<com.adamratzman.spotify.models.DisallowablePlaybackAction> getDisallows()+
A list of class DisallowablePlaybackAction
that have an explicit setting
class DisallowablePlaybackAction
public java.util.Map<java.lang.String,java.lang.Boolean> get_disallows()+
public java.util.Map<java.lang.String,java.lang.Boolean> component1()+
public PlaybackActions copy(java.util.Map<java.lang.String,java.lang.Boolean> _disallows)+
List of playback actions (pause, resume, etc) which a user is disallowed or allowed to do. Playback actions
+NOT in PlaybackActions.getDisallows
are allowed.
PlaybackActions.getDisallows
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Playlist
+extends CoreObject
+Represents a Playlist on Spotify
Constructor and Description | +
---|
Playlist(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ boolean collaborative,
+ java.lang.String description,
+ Followers followers,
+ java.lang.String primaryColor,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks,
+ java.lang.String type)
+Represents a Playlist on Spotify
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component10()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+component11()
+The user who owns the playlist
+ |
+
java.lang.Boolean |
+component12()
+The playlist’s public/private status
+ |
+
PagingObject<com.adamratzman.spotify.models.PlaylistTrack> |
+component14()
+Information about the tracks of the playlist.
+ |
+
java.lang.String |
+component15()
+The object type
+ |
+
boolean |
+component5()
+Returns true if context is not search and the owner allows other users to modify the playlist.
+ |
+
java.lang.String |
+component6()
+The playlist description.
+ |
+
Followers |
+component7() |
+
java.lang.String |
+component8()
+Unknown.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component9()
+Images for the playlist.
+ |
+
Playlist |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ boolean collaborative,
+ java.lang.String description,
+ Followers followers,
+ java.lang.String primaryColor,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks,
+ java.lang.String type)
+Represents a Playlist on Spotify
+ |
+
boolean |
+equals(java.lang.Object p) |
+
boolean |
+getCollaborative()
+Returns true if context is not search and the owner allows other users to modify the playlist.
+ |
+
java.lang.String |
+getDescription()
+The playlist description.
+ |
+
Followers |
+getFollowers() |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+Images for the playlist.
+ |
+
java.lang.String |
+getName()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+getOwner()
+The user who owns the playlist
+ |
+
java.lang.String |
+getPrimaryColor()
+Unknown.
+ |
+
java.lang.Boolean |
+getPublic()
+The playlist’s public/private status
+ |
+
ClientPlaylistAPI.Snapshot |
+getSnapshot()
+The version identifier for the current playlist. Can be supplied in other requests to target
+a specific playlist version
+ |
+
PagingObject<com.adamratzman.spotify.models.PlaylistTrack> |
+getTracks()
+Information about the tracks of the playlist.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public Playlist(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + boolean collaborative, + java.lang.String description, + Followers followers, + java.lang.String primaryColor, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.Boolean p, + java.lang.String _snapshotId, + PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks, + java.lang.String type)+
Represents a Playlist on Spotify
collaborative
- Returns true if context is not search and the owner allows other users to modify the playlist.Otherwise returns false.description
- The playlist description. Only returned for modified, verified playlists, otherwise null.followers
- primaryColor
- Unknown.images
- Images for the playlist. The array may be empty or contain up to three images.The images are returned by size in descending order.Note: If returned, the source URL for theimage ( url ) is temporary and will expire in less than a day.name
- The name of the playlist.owner
- The user who owns the playlistp
- The playlist’s public/private status: true the playlist is public, false the playlist is private,null the playlist status is not relevanttracks
- Information about the tracks of the playlist.type
- The object type: “playlist”public ClientPlaylistAPI.Snapshot getSnapshot()+
The version identifier for the current playlist. Can be supplied in other requests to target +a specific playlist version
public boolean getCollaborative()+
Returns true if context is not search and the owner allows other users to modify the playlist.
Otherwise returns false.
public java.lang.String getDescription()+
The playlist description.
Only returned for modified, verified playlists, otherwise null.
public Followers getFollowers()+
public java.lang.String getPrimaryColor()+
Unknown.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order.Note: If returned, the source URL for theimage ( url ) is temporary and will expire in less than a day.
public java.lang.String getName()+
The name of the playlist.
public SpotifyPublicUser getOwner()+
The user who owns the playlist
public java.lang.Boolean getPublic()+
The playlist’s public/private status
: true the playlist is public, false the playlist is private,null the playlist status is not relevant
public PagingObject<com.adamratzman.spotify.models.PlaylistTrack> getTracks()+
Information about the tracks of the playlist.
public java.lang.String getType()+
The object type
: “playlist”
public boolean component5()+
Returns true if context is not search and the owner allows other users to modify the playlist.
Otherwise returns false.
public java.lang.String component6()+
The playlist description.
Only returned for modified, verified playlists, otherwise null.
public Followers component7()+
public java.lang.String component8()+
Unknown.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component9()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order.Note: If returned, the source URL for theimage ( url ) is temporary and will expire in less than a day.
public java.lang.String component10()+
The name of the playlist.
public SpotifyPublicUser component11()+
The user who owns the playlist
public java.lang.Boolean component12()+
The playlist’s public/private status
: true the playlist is public, false the playlist is private,null the playlist status is not relevant
public PagingObject<com.adamratzman.spotify.models.PlaylistTrack> component14()+
Information about the tracks of the playlist.
public java.lang.String component15()+
The object type
: “playlist”
public Playlist copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + boolean collaborative, + java.lang.String description, + Followers followers, + java.lang.String primaryColor, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.Boolean p, + java.lang.String _snapshotId, + PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks, + java.lang.String type)+
Represents a Playlist on Spotify
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlaylistTrack
+Represents a Spotify track inside a class Playlist
class Playlist
Constructor and Description | +
---|
PlaylistTrack(java.lang.String primaryColor,
+ java.lang.String addedAt,
+ SpotifyPublicUser addedBy,
+ java.lang.Boolean isLocal,
+ Track track,
+ VideoThumbnail videoThumbnail)
+Represents a Spotify track inside a
+class Playlist |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+Unknown.
+ |
+
java.lang.String |
+component2()
+The date and time the track was added.
+ |
+
SpotifyPublicUser |
+component3()
+The Spotify user who added the track.
+ |
+
java.lang.Boolean |
+component4()
+Whether this track is a local file or not.
+ |
+
Track |
+component5()
+Information about the track.
+ |
+
VideoThumbnail |
+component6() |
+
PlaylistTrack |
+copy(java.lang.String primaryColor,
+ java.lang.String addedAt,
+ SpotifyPublicUser addedBy,
+ java.lang.Boolean isLocal,
+ Track track,
+ VideoThumbnail videoThumbnail)
+Represents a Spotify track inside a
+class Playlist |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAddedAt()
+The date and time the track was added.
+ |
+
SpotifyPublicUser |
+getAddedBy()
+The Spotify user who added the track.
+ |
+
java.lang.String |
+getPrimaryColor()
+Unknown.
+ |
+
Track |
+getTrack()
+Information about the track.
+ |
+
VideoThumbnail |
+getVideoThumbnail() |
+
int |
+hashCode() |
+
java.lang.Boolean |
+isLocal()
+Whether this track is a local file or not.
+ |
+
java.lang.String |
+toString() |
+
public PlaylistTrack(java.lang.String primaryColor, + java.lang.String addedAt, + SpotifyPublicUser addedBy, + java.lang.Boolean isLocal, + Track track, + VideoThumbnail videoThumbnail)+
Represents a Spotify track inside a class Playlist
primaryColor
- Unknown. Undocumented fieldaddedAt
- The date and time the track was added. Note that some very old playlists may return null in this field.addedBy
- The Spotify user who added the track. Note that some very old playlists may return null in this field.isLocal
- Whether this track is a local file or not.track
- Information about the track.class Playlist
public java.lang.String getPrimaryColor()+
Unknown.
Undocumented field
public java.lang.String getAddedAt()+
The date and time the track was added.
Note that some very old playlists may return null in this field.
public SpotifyPublicUser getAddedBy()+
The Spotify user who added the track.
Note that some very old playlists may return null in this field.
public java.lang.Boolean isLocal()+
Whether this track is a local file or not.
public Track getTrack()+
Information about the track.
public VideoThumbnail getVideoThumbnail()+
public java.lang.String component1()+
Unknown.
Undocumented field
public java.lang.String component2()+
The date and time the track was added.
Note that some very old playlists may return null in this field.
public SpotifyPublicUser component3()+
The Spotify user who added the track.
Note that some very old playlists may return null in this field.
public java.lang.Boolean component4()+
Whether this track is a local file or not.
public Track component5()+
Information about the track.
public VideoThumbnail component6()+
public PlaylistTrack copy(java.lang.String primaryColor, + java.lang.String addedAt, + SpotifyPublicUser addedBy, + java.lang.Boolean isLocal, + Track track, + VideoThumbnail videoThumbnail)+
Represents a Spotify track inside a class Playlist
class Playlist
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlaylistTrackInfo
+A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks +can be retrieved, along with the total number of tracks in the playlist.
Constructor and Description | +
---|
PlaylistTrackInfo(java.lang.String href,
+ int total)
+A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks
+can be retrieved, along with the total number of tracks in the playlist.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+link to the Web API endpoint where full details of the playlist’s tracks
+ |
+
int |
+component2()
+the total number of tracks in the playlist.
+ |
+
PlaylistTrackInfo |
+copy(java.lang.String href,
+ int total)
+A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks
+can be retrieved, along with the total number of tracks in the playlist.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getHref()
+link to the Web API endpoint where full details of the playlist’s tracks
+ |
+
int |
+getTotal()
+the total number of tracks in the playlist.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public PlaylistTrackInfo(java.lang.String href, + int total)+
A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks +can be retrieved, along with the total number of tracks in the playlist.
href
- link to the Web API endpoint where full details of the playlist’s trackscan be retrievedtotal
- the total number of tracks in the playlist.public java.lang.String getHref()+
link to the Web API endpoint where full details of the playlist’s tracks
can be retrieved
public int getTotal()+
the total number of tracks in the playlist.
public java.lang.String component1()+
link to the Web API endpoint where full details of the playlist’s tracks
can be retrieved
public int component2()+
the total number of tracks in the playlist.
public PlaylistTrackInfo copy(java.lang.String href, + int total)+
A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks +can be retrieved, along with the total number of tracks in the playlist.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlaylistURI
+extends SpotifyUri
+Represents a Spotify Playlist URI, parsed from either a Spotify ID or taken from an endpoint.
Constructor and Description | +
---|
PlaylistURI(java.lang.String input)
+Represents a Spotify Playlist URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
public class RecommendationResponse
+Constructor and Description | +
---|
RecommendationResponse(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds,
+ java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.RecommendationSeed> |
+component1()
+An array of recommendation seed objects.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleTrack> |
+component2()
+An array of track object
+ |
+
RecommendationResponse |
+copy(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds,
+ java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.RecommendationSeed> |
+getSeeds()
+An array of recommendation seed objects.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleTrack> |
+getTracks()
+An array of track object
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public RecommendationResponse(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds, + java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks)+
seeds
- An array of recommendation seed objects.tracks
- An array of track object (simplified) ordered according to the parameters supplied.public java.util.List<com.adamratzman.spotify.models.RecommendationSeed> getSeeds()+
An array of recommendation seed objects.
public java.util.List<com.adamratzman.spotify.models.SimpleTrack> getTracks()+
An array of track object
(simplified) ordered according to the parameters supplied.
public java.util.List<com.adamratzman.spotify.models.RecommendationSeed> component1()+
An array of recommendation seed objects.
public java.util.List<com.adamratzman.spotify.models.SimpleTrack> component2()+
An array of track object
(simplified) ordered according to the parameters supplied.
public RecommendationResponse copy(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds, + java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class RecommendationSeed
+extends Identifiable
+Seed from which the recommendation was constructed
Constructor and Description | +
---|
RecommendationSeed(java.lang.String _href,
+ java.lang.String _id,
+ int initialPoolSize,
+ int afterFilteringSize,
+ java.lang.Integer afterRelinkingSize,
+ java.lang.String type)
+Seed from which the recommendation was constructed
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component3()
+The number of recommended tracks available for this seed.
+ |
+
int |
+component4()
+The number of tracks available after min
+ |
+
java.lang.Integer |
+component5()
+The number of tracks available after relinking for regional availability.
+ |
+
java.lang.String |
+component6()
+The entity type of this seed.
+ |
+
RecommendationSeed |
+copy(java.lang.String _href,
+ java.lang.String _id,
+ int initialPoolSize,
+ int afterFilteringSize,
+ java.lang.Integer afterRelinkingSize,
+ java.lang.String type)
+Seed from which the recommendation was constructed
+ |
+
boolean |
+equals(java.lang.Object p) |
+
int |
+getAfterFilteringSize()
+The number of tracks available after min
+ |
+
java.lang.Integer |
+getAfterRelinkingSize()
+The number of tracks available after relinking for regional availability.
+ |
+
int |
+getInitialPoolSize()
+The number of recommended tracks available for this seed.
+ |
+
java.lang.String |
+getType()
+The entity type of this seed.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getId
getHref, getId
public RecommendationSeed(java.lang.String _href, + java.lang.String _id, + int initialPoolSize, + int afterFilteringSize, + java.lang.Integer afterRelinkingSize, + java.lang.String type)+
Seed from which the recommendation was constructed
initialPoolSize
- The number of recommended tracks available for this seed.afterFilteringSize
- The number of tracks available after min_* and max_* filters have been applied.afterRelinkingSize
- The number of tracks available after relinking for regional availability.type
- The entity type of this seed. One of artist , track or genre.public int getInitialPoolSize()+
The number of recommended tracks available for this seed.
public int getAfterFilteringSize()+
The number of tracks available after min
_* and max_* filters have been applied.
public java.lang.Integer getAfterRelinkingSize()+
The number of tracks available after relinking for regional availability.
public java.lang.String getType()+
The entity type of this seed.
One of artist , track or genre.
public int component3()+
The number of recommended tracks available for this seed.
public int component4()+
The number of tracks available after min
_* and max_* filters have been applied.
public java.lang.Integer component5()+
The number of tracks available after relinking for regional availability.
public java.lang.String component6()+
The entity type of this seed.
One of artist , track or genre.
public RecommendationSeed copy(java.lang.String _href, + java.lang.String _id, + int initialPoolSize, + int afterFilteringSize, + java.lang.Integer afterRelinkingSize, + java.lang.String type)+
Seed from which the recommendation was constructed
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class RelinkingAvailableResponse
+extends CoreObject
+Constructor and Description | +
---|
RelinkingAvailableResponse(LinkedTrack linkedTrack,
+ java.lang.String _href,
+ java.lang.String _id,
+ SpotifyUri _uri,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls) |
+
Modifier and Type | +Method and Description | +
---|---|
LinkedTrack |
+getLinkedTrack() |
+
boolean |
+isRelinked() |
+
getExternalUrls, getUri
getId
getHref, getId
public RelinkingAvailableResponse(LinkedTrack linkedTrack, + java.lang.String _href, + java.lang.String _id, + SpotifyUri _uri, + java.util.Map<java.lang.String,java.lang.String> _externalUrls)+
public boolean isRelinked()+
public LinkedTrack getLinkedTrack()+
public enum RepeatState +implements ResultEnum+
How and if playback is repeating
Enum Constant and Description | +
---|
CONTEXT |
+
OFF |
+
TRACK |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getIdentifier() |
+
java.lang.String |
+retrieveIdentifier() |
+
retrieveIdentifier
public static RepeatState OFF+
public static RepeatState TRACK+
public static RepeatState CONTEXT+
public class Restrictions
+Contains an explanation of why a track is not available
Constructor and Description | +
---|
Restrictions(java.lang.String reason)
+Contains an explanation of why a track is not available
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+why the track is not available
+ |
+
Restrictions |
+copy(java.lang.String reason)
+Contains an explanation of why a track is not available
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getReason()
+why the track is not available
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Restrictions(java.lang.String reason)+
Contains an explanation of why a track is not available
reason
- why the track is not availablepublic java.lang.String getReason()+
why the track is not available
public java.lang.String component1()+
why the track is not available
public Restrictions copy(java.lang.String reason)+
Contains an explanation of why a track is not available
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public ResultEnum
+Modifier and Type | +Method and Description | +
---|---|
java.lang.Object |
+retrieveIdentifier() |
+
public class ResultObjectsKt
+public class SavedAlbum
+Represents an album saved in a user's library
Constructor and Description | +
---|
SavedAlbum(java.lang.String addedAt,
+ Album album)
+Represents an album saved in a user's library
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The date and time the album was saved.
+ |
+
Album |
+component2()
+Information about the album.
+ |
+
SavedAlbum |
+copy(java.lang.String addedAt,
+ Album album)
+Represents an album saved in a user's library
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAddedAt()
+The date and time the album was saved.
+ |
+
Album |
+getAlbum()
+Information about the album.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SavedAlbum(java.lang.String addedAt, + Album album)+
Represents an album saved in a user's library
addedAt
- The date and time the album was saved.album
- Information about the album.public java.lang.String getAddedAt()+
The date and time the album was saved.
public Album getAlbum()+
Information about the album.
public java.lang.String component1()+
The date and time the album was saved.
public Album component2()+
Information about the album.
public SavedAlbum copy(java.lang.String addedAt, + Album album)+
Represents an album saved in a user's library
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SavedTrack
+Represents a track saved in a user's library
Constructor and Description | +
---|
SavedTrack(java.lang.String addedAt,
+ Track track)
+Represents a track saved in a user's library
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The date and time the track was saved.
+ |
+
Track |
+component2()
+The track object.
+ |
+
SavedTrack |
+copy(java.lang.String addedAt,
+ Track track)
+Represents a track saved in a user's library
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAddedAt()
+The date and time the track was saved.
+ |
+
Track |
+getTrack()
+The track object.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SavedTrack(java.lang.String addedAt, + Track track)+
Represents a track saved in a user's library
addedAt
- The date and time the track was saved.track
- The track object.public java.lang.String getAddedAt()+
The date and time the track was saved.
public Track getTrack()+
The track object.
public java.lang.String component1()+
The date and time the track was saved.
public Track component2()+
The track object.
public SavedTrack copy(java.lang.String addedAt, + Track track)+
Represents a track saved in a user's library
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimpleAlbum
+extends CoreObject
+Simplified Album object that can be used to retrieve a full class Album
class Album
Constructor and Description | +
---|
SimpleAlbum(java.lang.String _albumType,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ java.lang.String type,
+ Restrictions restrictions,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ java.lang.Integer totalTracks,
+ java.lang.String albumGroupString)
+Simplified Album object that can be used to retrieve a full
+class Album |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component10()
+The object type
+ |
+
Restrictions |
+component11()
+Part of the response when Track Relinking is applied,
+ |
+
java.lang.String |
+component12()
+The date the album was first released,
+ |
+
java.lang.String |
+component13()
+The precision with which release
+ |
+
java.lang.Integer |
+component14() |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component7()
+The artists of the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component8()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+component9()
+The name of the album.
+ |
+
SimpleAlbum |
+copy(java.lang.String _albumType,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ java.lang.String type,
+ Restrictions restrictions,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ java.lang.Integer totalTracks,
+ java.lang.String albumGroupString)
+Simplified Album object that can be used to retrieve a full
+class Album |
+
boolean |
+equals(java.lang.Object p) |
+
AlbumResultType |
+getAlbumGroup()
+Optional. The field is present when getting an artist’s albums. Possible values
+are “album”, “single”, “compilation”, “appears_on”. Compare to album_type this field represents relationship
+between the artist and the album.
+ |
+
AlbumResultType |
+getAlbumType()
+The type of the album: one of “album”, “single”, or “compilation”.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists of the album.
+ |
+
java.util.List<com.neovisionaries.i18n.CountryCode> |
+getAvailableMarkets()
+The markets in which the album is available: ISO 3166-1 alpha-2 country codes. Note
+that an album is considered available in a market when at least 1 of its tracks is available in that market.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+getName()
+The name of the album.
+ |
+
java.lang.String |
+getReleaseDate()
+The date the album was first released,
+ |
+
java.lang.String |
+getReleaseDatePrecision()
+The precision with which release
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
java.lang.Integer |
+getTotalTracks() |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Album> |
+toFullAlbum(com.neovisionaries.i18n.CountryCode market)
+Converts this
+class SimpleAlbum into a full class Album object with the given
+market |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public SimpleAlbum(java.lang.String _albumType, + java.util.List<java.lang.String> _availableMarkets, + java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + java.lang.String type, + Restrictions restrictions, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + java.lang.Integer totalTracks, + java.lang.String albumGroupString)+
Simplified Album object that can be used to retrieve a full class Album
artists
- The artists of the album. Each artist object includes a link in href to more detailed information about the artist.images
- The cover art for the album in various sizes, widest first.name
- The name of the album. In case of an album takedown, the value may be an empty string.type
- The object type: “album”restrictions
- Part of the response when Track Relinking is applied, the original track is not availablein the given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}releaseDate
- The date the album was first released, for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.releaseDatePrecision
- The precision with which release_date value is known: year , month , or day.class Album
public java.util.List<com.neovisionaries.i18n.CountryCode> getAvailableMarkets()+
The markets in which the album is available: ISO 3166-1 alpha-2 country codes. Note +that an album is considered available in a market when at least 1 of its tracks is available in that market.
public AlbumResultType getAlbumType()+
The type of the album: one of “album”, “single”, or “compilation”.
public AlbumResultType getAlbumGroup()+
Optional. The field is present when getting an artist’s albums. Possible values +are “album”, “single”, “compilation”, “appears_on”. Compare to album_type this field represents relationship +between the artist and the album.
public SpotifyRestAction<com.adamratzman.spotify.models.Album> toFullAlbum(com.neovisionaries.i18n.CountryCode market)+
Converts this class SimpleAlbum
into a full class Album
object with the given
+market
market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.class SimpleAlbum
,
+class Album
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists of the album.
Each artist object includes a link in href to more detailed information about the artist.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The cover art for the album in various sizes,
widest first.
public java.lang.String getName()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public java.lang.String getType()+
The object type
: “album”
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public java.lang.String getReleaseDate()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String getReleaseDatePrecision()+
The precision with which release
_date value is known: year , month , or day.
public java.lang.Integer getTotalTracks()+
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component7()+
The artists of the album.
Each artist object includes a link in href to more detailed information about the artist.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component8()+
The cover art for the album in various sizes,
widest first.
public java.lang.String component9()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public java.lang.String component10()+
The object type
: “album”
public Restrictions component11()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public java.lang.String component12()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String component13()+
The precision with which release
_date value is known: year , month , or day.
public java.lang.Integer component14()+
public SimpleAlbum copy(java.lang.String _albumType, + java.util.List<java.lang.String> _availableMarkets, + java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + java.lang.String type, + Restrictions restrictions, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + java.lang.Integer totalTracks, + java.lang.String albumGroupString)+
Simplified Album object that can be used to retrieve a full class Album
class Album
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimpleArtist
+extends CoreObject
+Simplified Artist object that can be used to retrieve a full class Artist
class Artist
Constructor and Description | +
---|
SimpleArtist(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String name,
+ java.lang.String type)
+Simplified Artist object that can be used to retrieve a full
+class Artist |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component5()
+The name of the artist
+ |
+
java.lang.String |
+component6()
+The object type
+ |
+
SimpleArtist |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String name,
+ java.lang.String type)
+Simplified Artist object that can be used to retrieve a full
+class Artist |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getName()
+The name of the artist
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Artist> |
+toFullArtist()
+Converts this
+class SimpleArtist into a full class Artist object |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public SimpleArtist(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String name, + java.lang.String type)+
Simplified Artist object that can be used to retrieve a full class Artist
name
- The name of the artisttype
- The object type: "artist"class Artist
public SpotifyRestAction<com.adamratzman.spotify.models.Artist> toFullArtist()+
Converts this class SimpleArtist
into a full class Artist
object
class SimpleArtist
,
+class Artist
public java.lang.String getName()+
The name of the artist
public java.lang.String getType()+
The object type
: "artist"
public java.lang.String component5()+
The name of the artist
public java.lang.String component6()+
The object type
: "artist"
public SimpleArtist copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String name, + java.lang.String type)+
Simplified Artist object that can be used to retrieve a full class Artist
class Artist
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimplePlaylist
+extends CoreObject
+Simplified Playlist object that can be used to retrieve a full class Playlist
class Playlist
Constructor and Description | +
---|
SimplePlaylist(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ boolean collaborative,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.String primaryColor,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PlaylistTrackInfo tracks,
+ java.lang.String type)
+Simplified Playlist object that can be used to retrieve a full
+class Playlist |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Boolean |
+component10()
+The playlist’s public/private status
+ |
+
PlaylistTrackInfo |
+component12()
+A collection containing a link
+ |
+
java.lang.String |
+component13()
+The object type
+ |
+
boolean |
+component5()
+Returns true if context is not search and the owner allows other users to
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component6()
+Images for the playlist.
+ |
+
java.lang.String |
+component7()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+component8()
+The user who owns the playlist
+ |
+
java.lang.String |
+component9()
+Unknown.
+ |
+
SimplePlaylist |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ boolean collaborative,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.String primaryColor,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PlaylistTrackInfo tracks,
+ java.lang.String type)
+Simplified Playlist object that can be used to retrieve a full
+class Playlist |
+
boolean |
+equals(java.lang.Object p) |
+
boolean |
+getCollaborative()
+Returns true if context is not search and the owner allows other users to
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+Images for the playlist.
+ |
+
java.lang.String |
+getName()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+getOwner()
+The user who owns the playlist
+ |
+
java.lang.String |
+getPrimaryColor()
+Unknown.
+ |
+
java.lang.Boolean |
+getPublic()
+The playlist’s public/private status
+ |
+
ClientPlaylistAPI.Snapshot |
+getSnapshot()
+The version identifier for the current playlist. Can be supplied in other
+requests to target a specific playlist version
+ |
+
PlaylistTrackInfo |
+getTracks()
+A collection containing a link
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Playlist> |
+toFullPlaylist(com.neovisionaries.i18n.CountryCode market)
+Converts this
+class SimplePlaylist into a full class Playlist object with the given
+market |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public SimplePlaylist(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + boolean collaborative, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.String primaryColor, + java.lang.Boolean p, + java.lang.String _snapshotId, + PlaylistTrackInfo tracks, + java.lang.String type)+
Simplified Playlist object that can be used to retrieve a full class Playlist
collaborative
- Returns true if context is not search and the owner allows other users tomodify the playlist. Otherwise returns false.images
- Images for the playlist. The array may be empty or contain up to three images.The images are returned by size in descending order. See Working with Playlists.Note: If returned, the source URL for the image ( url ) is temporary and will expire in less than a day.name
- The name of the playlist.owner
- The user who owns the playlistprimaryColor
- Unknown.p
- The playlist’s public/private status: true the playlist is public, false theplaylist is private, null the playlist status is not relevant.tracks
- A collection containing a link ( href ) to the Web API endpoint where full details of theplaylist’s tracks can be retrieved, along with the total number of tracks in the playlist.type
- The object type: “playlist”class Playlist
public ClientPlaylistAPI.Snapshot getSnapshot()+
The version identifier for the current playlist. Can be supplied in other +requests to target a specific playlist version
public SpotifyRestAction<com.adamratzman.spotify.models.Playlist> toFullPlaylist(com.neovisionaries.i18n.CountryCode market)+
Converts this class SimplePlaylist
into a full class Playlist
object with the given
+market
market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.class SimplePlaylist
,
+class Playlist
public boolean getCollaborative()+
Returns true if context is not search and the owner allows other users to
modify the playlist. Otherwise returns false.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order. See Working with Playlists.Note: If returned, the source URL for the image ( url ) is temporary and will expire in less than a day.
public java.lang.String getName()+
The name of the playlist.
public SpotifyPublicUser getOwner()+
The user who owns the playlist
public java.lang.String getPrimaryColor()+
Unknown.
public java.lang.Boolean getPublic()+
The playlist’s public/private status
: true the playlist is public, false theplaylist is private, null the playlist status is not relevant.
public PlaylistTrackInfo getTracks()+
A collection containing a link
( href ) to the Web API endpoint where full details of theplaylist’s tracks can be retrieved, along with the total number of tracks in the playlist.
public java.lang.String getType()+
The object type
: “playlist”
public boolean component5()+
Returns true if context is not search and the owner allows other users to
modify the playlist. Otherwise returns false.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component6()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order. See Working with Playlists.Note: If returned, the source URL for the image ( url ) is temporary and will expire in less than a day.
public java.lang.String component7()+
The name of the playlist.
public SpotifyPublicUser component8()+
The user who owns the playlist
public java.lang.String component9()+
Unknown.
public java.lang.Boolean component10()+
The playlist’s public/private status
: true the playlist is public, false theplaylist is private, null the playlist status is not relevant.
public PlaylistTrackInfo component12()+
A collection containing a link
( href ) to the Web API endpoint where full details of theplaylist’s tracks can be retrieved, along with the total number of tracks in the playlist.
public java.lang.String component13()+
The object type
: “playlist”
public SimplePlaylist copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + boolean collaborative, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.String primaryColor, + java.lang.Boolean p, + java.lang.String _snapshotId, + PlaylistTrackInfo tracks, + java.lang.String type)+
Simplified Playlist object that can be used to retrieve a full class Playlist
class Playlist
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimpleTrack
+extends RelinkingAvailableResponse
+Simplified Playlist object that can be used to retrieve a full class Playlist
class Playlist
Constructor and Description | +
---|
SimpleTrack(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.util.Map<java.lang.String,java.lang.String> _externalIds,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ boolean isPlayable,
+ LinkedTrack linkedFrom,
+ java.lang.String name,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.Boolean isLocal,
+ java.lang.Integer popularity,
+ Restrictions restrictions)
+Simplified Playlist object that can be used to retrieve a full
+class Playlist |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+component10()
+Whether or not the track has explicit lyrics
+ |
+
boolean |
+component11()
+Part of the response when Track Relinking is applied.
+ |
+
java.lang.String |
+component13()
+The name of the track.
+ |
+
java.lang.String |
+component14()
+A URL to a 30 second preview
+ |
+
int |
+component15()
+The number of the track.
+ |
+
java.lang.String |
+component16()
+The object type
+ |
+
java.lang.Boolean |
+component17()
+Whether or not the track is from a local file.
+ |
+
java.lang.Integer |
+component18()
+the popularity of this track.
+ |
+
Restrictions |
+component19()
+Part of the response when Track Relinking is applied,
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component7()
+The artists who performed the track.
+ |
+
int |
+component8()
+The disc number
+ |
+
int |
+component9()
+The track length in milliseconds.
+ |
+
SimpleTrack |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.util.Map<java.lang.String,java.lang.String> _externalIds,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ boolean isPlayable,
+ LinkedTrack linkedFrom,
+ java.lang.String name,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.Boolean isLocal,
+ java.lang.Integer popularity,
+ Restrictions restrictions)
+Simplified Playlist object that can be used to retrieve a full
+class Playlist |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists who performed the track.
+ |
+
java.util.List<com.neovisionaries.i18n.CountryCode> |
+getAvailableMarkets()
+A list of the countries in which the track can be played,
+identified by their ISO 3166-1 alpha-2 code.
+ |
+
int |
+getDiscNumber()
+The disc number
+ |
+
int |
+getDurationMs()
+The track length in milliseconds.
+ |
+
boolean |
+getExplicit()
+Whether or not the track has explicit lyrics
+ |
+
java.util.List<com.adamratzman.spotify.models.ExternalId> |
+getExternalIds()
+External IDs for this track.
+ |
+
java.lang.String |
+getName()
+The name of the track.
+ |
+
java.lang.Integer |
+getPopularity()
+the popularity of this track.
+ |
+
java.lang.String |
+getPreviewUrl()
+A URL to a 30 second preview
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+getTrackNumber()
+The number of the track.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.Boolean |
+isLocal()
+Whether or not the track is from a local file.
+ |
+
boolean |
+isPlayable()
+Part of the response when Track Relinking is applied.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.Track> |
+toFullTrack(com.neovisionaries.i18n.CountryCode market)
+Converts this
+class SimpleTrack into a full class Track object with the given
+market |
+
java.lang.String |
+toString() |
+
getLinkedTrack, isRelinked
getExternalUrls, getUri
getId
getHref, getId
public SimpleTrack(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.util.List<java.lang.String> _availableMarkets, + java.util.Map<java.lang.String,java.lang.String> _externalIds, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + int discNumber, + int durationMs, + boolean explicit, + boolean isPlayable, + LinkedTrack linkedFrom, + java.lang.String name, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.Boolean isLocal, + java.lang.Integer popularity, + Restrictions restrictions)+
Simplified Playlist object that can be used to retrieve a full class Playlist
artists
- The artists who performed the track. Each artist object includes a link in href tomore detailed information about the artist.discNumber
- The disc number (usually 1 unless the album consists of more than one disc).durationMs
- The track length in milliseconds.explicit
- Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).isPlayable
- Part of the response when Track Relinking is applied. If true ,the track is playable in the given market. Otherwise false.name
- The name of the track.previewUrl
- A URL to a 30 second preview (MP3 format) of the track.trackNumber
- The number of the track. If an album has several discs, the track numberis the number on the specified disc.type
- The object type: “track”.isLocal
- Whether or not the track is from a local file.popularity
- the popularity of this track. possibly nullrestrictions
- Part of the response when Track Relinking is applied, the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}class Playlist
public java.util.List<com.neovisionaries.i18n.CountryCode> getAvailableMarkets()+
A list of the countries in which the track can be played, +identified by their ISO 3166-1 alpha-2 code.
public java.util.List<com.adamratzman.spotify.models.ExternalId> getExternalIds()+
External IDs for this track.
public SpotifyRestAction<com.adamratzman.spotify.models.Track> toFullTrack(com.neovisionaries.i18n.CountryCode market)+
Converts this class SimpleTrack
into a full class Track
object with the given
+market
market
- Provide this parameter if you want the list of returned items to be relevant to a particular country.class SimpleTrack
,
+class Track
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists who performed the track.
Each artist object includes a link in href tomore detailed information about the artist.
public int getDiscNumber()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int getDurationMs()+
The track length in milliseconds.
public boolean getExplicit()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public boolean isPlayable()+
Part of the response when Track Relinking is applied.
If true ,the track is playable in the given market. Otherwise false.
public java.lang.String getName()+
The name of the track.
public java.lang.String getPreviewUrl()+
A URL to a 30 second preview
(MP3 format) of the track.
public int getTrackNumber()+
The number of the track.
If an album has several discs, the track numberis the number on the specified disc.
public java.lang.String getType()+
The object type
: “track”.
public java.lang.Boolean isLocal()+
Whether or not the track is from a local file.
public java.lang.Integer getPopularity()+
the popularity of this track.
possibly null
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component7()+
The artists who performed the track.
Each artist object includes a link in href tomore detailed information about the artist.
public int component8()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int component9()+
The track length in milliseconds.
public boolean component10()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public boolean component11()+
Part of the response when Track Relinking is applied.
If true ,the track is playable in the given market. Otherwise false.
public java.lang.String component13()+
The name of the track.
public java.lang.String component14()+
A URL to a 30 second preview
(MP3 format) of the track.
public int component15()+
The number of the track.
If an album has several discs, the track numberis the number on the specified disc.
public java.lang.String component16()+
The object type
: “track”.
public java.lang.Boolean component17()+
Whether or not the track is from a local file.
public java.lang.Integer component18()+
the popularity of this track.
possibly null
public Restrictions component19()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public SimpleTrack copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.util.List<java.lang.String> _availableMarkets, + java.util.Map<java.lang.String,java.lang.String> _externalIds, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + int discNumber, + int durationMs, + boolean explicit, + boolean isPlayable, + LinkedTrack linkedFrom, + java.lang.String name, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.Boolean isLocal, + java.lang.Integer popularity, + Restrictions restrictions)+
Simplified Playlist object that can be used to retrieve a full class Playlist
class Playlist
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyAuthenticationException
+Constructor and Description | +
---|
SpotifyAuthenticationException(java.lang.String message) |
+
public class SpotifyCategory
+extends Identifiable
+Spotify music category
Constructor and Description | +
---|
SpotifyCategory(java.lang.String _href,
+ java.lang.String _id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons,
+ java.lang.String name)
+Spotify music category
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component3()
+The category icon,
+ |
+
java.lang.String |
+component4()
+The name of the category.
+ |
+
SpotifyCategory |
+copy(java.lang.String _href,
+ java.lang.String _id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons,
+ java.lang.String name)
+Spotify music category
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getIcons()
+The category icon,
+ |
+
java.lang.String |
+getName()
+The name of the category.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getId
getHref, getId
public SpotifyCategory(java.lang.String _href, + java.lang.String _id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons, + java.lang.String name)+
Spotify music category
icons
- The category icon, in various sizes.name
- The name of the category.public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getIcons()+
The category icon,
in various sizes.
public java.lang.String getName()+
The name of the category.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component3()+
The category icon,
in various sizes.
public java.lang.String component4()+
The name of the category.
public SpotifyCategory copy(java.lang.String _href, + java.lang.String _id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons, + java.lang.String name)+
Spotify music category
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyCopyright
+Describes an album's copyright information
Constructor and Description | +
---|
SpotifyCopyright(java.lang.String _text,
+ java.lang.String _type)
+Describes an album's copyright information
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyCopyright |
+copy(java.lang.String _text,
+ java.lang.String _type)
+Describes an album's copyright information
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getText()
+The copyright text for this album.
+ |
+
CopyrightType |
+getType()
+The type of copyright: C = the copyright,
+P = the sound recording (performance) copyright.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyCopyright(java.lang.String _text, + java.lang.String _type)+
Describes an album's copyright information
public java.lang.String getText()+
The copyright text for this album.
public CopyrightType getType()+
The type of copyright: C = the copyright, +P = the sound recording (performance) copyright.
public SpotifyCopyright copy(java.lang.String _text, + java.lang.String _type)+
Describes an album's copyright information
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyImage
+A Spotify image
Constructor and Description | +
---|
SpotifyImage(java.lang.Integer height,
+ java.lang.String url,
+ java.lang.Integer width)
+A Spotify image
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Integer |
+component1()
+The image height in pixels.
+ |
+
java.lang.String |
+component2()
+The source URL of the image.
+ |
+
java.lang.Integer |
+component3()
+The image width in pixels.
+ |
+
SpotifyImage |
+copy(java.lang.Integer height,
+ java.lang.String url,
+ java.lang.Integer width)
+A Spotify image
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.Integer |
+getHeight()
+The image height in pixels.
+ |
+
java.lang.String |
+getUrl()
+The source URL of the image.
+ |
+
java.lang.Integer |
+getWidth()
+The image width in pixels.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyImage(java.lang.Integer height, + java.lang.String url, + java.lang.Integer width)+
A Spotify image
height
- The image height in pixels. If unknown: null or not returned.url
- The source URL of the image.width
- The image width in pixels. If unknown: null or not returned.public java.lang.Integer getHeight()+
The image height in pixels.
If unknown: null or not returned.
public java.lang.String getUrl()+
The source URL of the image.
public java.lang.Integer getWidth()+
The image width in pixels.
If unknown: null or not returned.
public java.lang.Integer component1()+
The image height in pixels.
If unknown: null or not returned.
public java.lang.String component2()+
The source URL of the image.
public java.lang.Integer component3()+
The image width in pixels.
If unknown: null or not returned.
public SpotifyImage copy(java.lang.Integer height, + java.lang.String url, + java.lang.Integer width)+
A Spotify image
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyPublicUser
+extends CoreObject
+Public information about a Spotify user
Constructor and Description | +
---|
SpotifyPublicUser(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String displayName,
+ Followers followers,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String type)
+Public information about a Spotify user
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component5()
+The name displayed on the user’s profile.
+ |
+
Followers |
+component6()
+Information about the followers of this user.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component7()
+The user’s profile image.
+ |
+
java.lang.String |
+component8()
+The object type
+ |
+
SpotifyPublicUser |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String displayName,
+ Followers followers,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String type)
+Public information about a Spotify user
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getDisplayName()
+The name displayed on the user’s profile.
+ |
+
Followers |
+getFollowers()
+Information about the followers of this user.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The user’s profile image.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public SpotifyPublicUser(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String displayName, + Followers followers, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String type)+
Public information about a Spotify user
displayName
- The name displayed on the user’s profile. null if not available.followers
- Information about the followers of this user.images
- The user’s profile image.type
- The object type: “user”public java.lang.String getDisplayName()+
The name displayed on the user’s profile.
null if not available.
public Followers getFollowers()+
Information about the followers of this user.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The user’s profile image.
public java.lang.String getType()+
The object type
: “user”
public java.lang.String component5()+
The name displayed on the user’s profile.
null if not available.
public Followers component6()+
Information about the followers of this user.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component7()+
The user’s profile image.
public java.lang.String component8()+
The object type
: “user”
public SpotifyPublicUser copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String displayName, + Followers followers, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String type)+
Public information about a Spotify user
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyRatelimitedException
+Thrown when SpotifyAPI.retryWhenRateLimited is false and requests have been ratelimited
Constructor and Description | +
---|
SpotifyRatelimitedException(long time)
+Thrown when SpotifyAPI.retryWhenRateLimited is false and requests have been ratelimited
+ |
+
public SpotifyRatelimitedException(long time)+
Thrown when SpotifyAPI.retryWhenRateLimited is false and requests have been ratelimited
time
- the time, in seconds, until the next request can be senttime
- the time, in seconds, until the next request can be sentpublic class SpotifySearchResult
+Constructor and Description | +
---|
SpotifySearchResult(java.util.List<com.adamratzman.spotify.models.Artist> artists,
+ java.util.List<com.adamratzman.spotify.models.SimpleAlbum> albums,
+ java.util.List<com.adamratzman.spotify.models.Track> tracks,
+ java.util.List<com.adamratzman.spotify.models.SimplePlaylist> playlists) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.SimpleAlbum> |
+getAlbums() |
+
java.util.List<com.adamratzman.spotify.models.Artist> |
+getArtists() |
+
java.util.List<com.adamratzman.spotify.models.SimplePlaylist> |
+getPlaylists() |
+
java.util.List<com.adamratzman.spotify.models.Track> |
+getTracks() |
+
public SpotifySearchResult(java.util.List<com.adamratzman.spotify.models.Artist> artists, + java.util.List<com.adamratzman.spotify.models.SimpleAlbum> albums, + java.util.List<com.adamratzman.spotify.models.Track> tracks, + java.util.List<com.adamratzman.spotify.models.SimplePlaylist> playlists)+
public java.util.List<com.adamratzman.spotify.models.Artist> getArtists()+
public java.util.List<com.adamratzman.spotify.models.SimpleAlbum> getAlbums()+
public java.util.List<com.adamratzman.spotify.models.Track> getTracks()+
public java.util.List<com.adamratzman.spotify.models.SimplePlaylist> getPlaylists()+
public class SpotifyUri
+Represents a Spotify URI, parsed from either a Spotify ID or taken from an endpoint.
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(java.lang.Object other) |
+
java.lang.String |
+getId()
+representation of this uri as an id
+ |
+
java.lang.String |
+getUri()
+retrieve this URI as a string
+ |
+
int |
+hashCode() |
+
public java.lang.String getUri()+
retrieve this URI as a string
public java.lang.String getId()+
representation of this uri as an id
public boolean equals(java.lang.Object other)+
public int hashCode()+
public class SpotifyUriException
+Constructor and Description | +
---|
SpotifyUriException(java.lang.String message) |
+
public class SpotifyUrisKt
+public class SpotifyUserInformation
+extends CoreObject
+Private information about a Spotify user. Each field may require a specific scope.
Constructor and Description | +
---|
SpotifyUserInformation(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String birthdate,
+ java.lang.String country,
+ java.lang.String displayName,
+ java.lang.String email,
+ Followers followers,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String product,
+ java.lang.String type)
+Private information about a Spotify user. Each field may require a specific scope.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component10()
+The user’s profile image.
+ |
+
java.lang.String |
+component11()
+The user’s Spotify subscription level
+ |
+
java.lang.String |
+component12()
+The object type
+ |
+
java.lang.String |
+component5()
+The user’s date-of-birth.
+ |
+
java.lang.String |
+component6()
+The country of the user,
+ |
+
java.lang.String |
+component7()
+The name displayed on the user’s profile.
+ |
+
java.lang.String |
+component8()
+The user’s email address,
+ |
+
Followers |
+component9()
+Information about the followers of the user.
+ |
+
SpotifyUserInformation |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ java.lang.String birthdate,
+ java.lang.String country,
+ java.lang.String displayName,
+ java.lang.String email,
+ Followers followers,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String product,
+ java.lang.String type)
+Private information about a Spotify user. Each field may require a specific scope.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getBirthdate()
+The user’s date-of-birth.
+ |
+
java.lang.String |
+getCountry()
+The country of the user,
+ |
+
java.lang.String |
+getDisplayName()
+The name displayed on the user’s profile.
+ |
+
java.lang.String |
+getEmail()
+The user’s email address,
+ |
+
Followers |
+getFollowers()
+Information about the followers of the user.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The user’s profile image.
+ |
+
java.lang.String |
+getProduct()
+The user’s Spotify subscription level
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
getExternalUrls, getUri
getId
getHref, getId
public SpotifyUserInformation(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String birthdate, + java.lang.String country, + java.lang.String displayName, + java.lang.String email, + Followers followers, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String product, + java.lang.String type)+
Private information about a Spotify user. Each field may require a specific scope.
birthdate
- The user’s date-of-birth. This field is only available when the current userhas granted access to the user-read-birthdate scope.country
- The country of the user, as set in the user’s account profile. An ISO 3166-1 alpha-2country code. This field is only available when the current user has granted access to the user-read-private scope.displayName
- The name displayed on the user’s profile. null if not available.email
- The user’s email address, as entered by the user when creating their account. Important! This emailaddress is unverified; there is no proof that it actually belongs to the user. This field is onlyavailable when the current user has granted access to the user-read-email scope.followers
- Information about the followers of the user.images
- The user’s profile image.product
- The user’s Spotify subscription level: “premium”, “free”, etc.(The subscription level “open” can be considered the same as “free”.) This field is only available when thecurrent user has granted access to the user-read-private scope.type
- The object type: “user”public java.lang.String getBirthdate()+
The user’s date-of-birth.
This field is only available when the current userhas granted access to the user-read-birthdate scope.
public java.lang.String getCountry()+
The country of the user,
as set in the user’s account profile. An ISO 3166-1 alpha-2country code. This field is only available when the current user has granted access to the user-read-private scope.
public java.lang.String getDisplayName()+
The name displayed on the user’s profile.
null if not available.
public java.lang.String getEmail()+
The user’s email address,
as entered by the user when creating their account. Important! This emailaddress is unverified; there is no proof that it actually belongs to the user. This field is onlyavailable when the current user has granted access to the user-read-email scope.
public Followers getFollowers()+
Information about the followers of the user.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The user’s profile image.
public java.lang.String getProduct()+
The user’s Spotify subscription level
: “premium”, “free”, etc.(The subscription level “open” can be considered the same as “free”.) This field is only available when thecurrent user has granted access to the user-read-private scope.
public java.lang.String getType()+
The object type
: “user”
public java.lang.String component5()+
The user’s date-of-birth.
This field is only available when the current userhas granted access to the user-read-birthdate scope.
public java.lang.String component6()+
The country of the user,
as set in the user’s account profile. An ISO 3166-1 alpha-2country code. This field is only available when the current user has granted access to the user-read-private scope.
public java.lang.String component7()+
The name displayed on the user’s profile.
null if not available.
public java.lang.String component8()+
The user’s email address,
as entered by the user when creating their account. Important! This emailaddress is unverified; there is no proof that it actually belongs to the user. This field is onlyavailable when the current user has granted access to the user-read-email scope.
public Followers component9()+
Information about the followers of the user.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component10()+
The user’s profile image.
public java.lang.String component11()+
The user’s Spotify subscription level
: “premium”, “free”, etc.(The subscription level “open” can be considered the same as “free”.) This field is only available when thecurrent user has granted access to the user-read-private scope.
public java.lang.String component12()+
The object type
: “user”
public SpotifyUserInformation copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + java.lang.String birthdate, + java.lang.String country, + java.lang.String displayName, + java.lang.String email, + Followers followers, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String product, + java.lang.String type)+
Private information about a Spotify user. Each field may require a specific scope.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TimeInterval
+This is a generic object used to represent various time intervals within Audio Analysis.
Constructor and Description | +
---|
TimeInterval(float start,
+ float duration,
+ float confidence)
+This is a generic object used to represent various time intervals within Audio Analysis.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+The starting point
+ |
+
float |
+component2()
+The duration
+ |
+
float |
+component3()
+The confidence,
+ |
+
TimeInterval |
+copy(float start,
+ float duration,
+ float confidence)
+This is a generic object used to represent various time intervals within Audio Analysis.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getConfidence()
+The confidence,
+ |
+
float |
+getDuration()
+The duration
+ |
+
float |
+getStart()
+The starting point
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public TimeInterval(float start, + float duration, + float confidence)+
This is a generic object used to represent various time intervals within Audio Analysis.
start
- The starting point (in seconds) of the time interval.duration
- The duration (in seconds) of the time interval.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the intervalpublic float getStart()+
The starting point
(in seconds) of the time interval.
public float getDuration()+
The duration
(in seconds) of the time interval.
public float getConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the interval
public float component1()+
The starting point
(in seconds) of the time interval.
public float component2()+
The duration
(in seconds) of the time interval.
public float component3()+
The confidence,
from 0.0 to 1.0, of the reliability of the interval
public TimeInterval copy(float start, + float duration, + float confidence)+
This is a generic object used to represent various time intervals within Audio Analysis.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Token
+Represents a Spotify Token, retrieved through instantiating a SpotifyAPI
Constructor and Description | +
---|
Token(java.lang.String accessToken,
+ java.lang.String tokenType,
+ int expiresIn,
+ java.lang.String refreshToken,
+ java.lang.String scopeString,
+ java.util.List<? extends com.adamratzman.spotify.SpotifyScope> scopes)
+Represents a Spotify Token, retrieved through instantiating a SpotifyAPI
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+An access token that can be provided in subsequent calls,
+ |
+
java.lang.String |
+component2()
+How the access token may be used
+ |
+
int |
+component3()
+The time period
+ |
+
java.lang.String |
+component4()
+A token that can be sent to the Spotify Accounts service in place of an authorization code,
+ |
+
java.util.List<com.adamratzman.spotify.SpotifyScope> |
+component6()
+A list of scopes granted access for this
+ |
+
Token |
+copy(java.lang.String accessToken,
+ java.lang.String tokenType,
+ int expiresIn,
+ java.lang.String refreshToken,
+ java.lang.String scopeString,
+ java.util.List<? extends com.adamratzman.spotify.SpotifyScope> scopes)
+Represents a Spotify Token, retrieved through instantiating a SpotifyAPI
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAccessToken()
+An access token that can be provided in subsequent calls,
+ |
+
long |
+getExpiresAt()
+The time, in milliseconds, at which this Token expires
+ |
+
int |
+getExpiresIn()
+The time period
+ |
+
java.lang.String |
+getRefreshToken()
+A token that can be sent to the Spotify Accounts service in place of an authorization code,
+ |
+
java.util.List<com.adamratzman.spotify.SpotifyScope> |
+getScopes()
+A list of scopes granted access for this
+ |
+
java.lang.String |
+getTokenType()
+How the access token may be used
+ |
+
int |
+hashCode() |
+
boolean |
+shouldRefresh() |
+
java.lang.String |
+toString() |
+
public Token(java.lang.String accessToken, + java.lang.String tokenType, + int expiresIn, + java.lang.String refreshToken, + java.lang.String scopeString, + java.util.List<? extends com.adamratzman.spotify.SpotifyScope> scopes)+
Represents a Spotify Token, retrieved through instantiating a SpotifyAPI
accessToken
- An access token that can be provided in subsequent calls,for example to Spotify Web API services.tokenType
- How the access token may be used: always “Bearer”.expiresIn
- The time period (in seconds) for which the access token is valid.refreshToken
- A token that can be sent to the Spotify Accounts service in place of an authorization code,null if the token was created using a method that does not support token refreshscopes
- A list of scopes granted access for this accessToken. Anempty list means that the token can only be used to acces public information.public long getExpiresAt()+
The time, in milliseconds, at which this Token expires
public boolean shouldRefresh()+
public java.lang.String getAccessToken()+
An access token that can be provided in subsequent calls,
for example to Spotify Web API services.
public java.lang.String getTokenType()+
How the access token may be used
: always “Bearer”.
public int getExpiresIn()+
The time period
(in seconds) for which the access token is valid.
public java.lang.String getRefreshToken()+
A token that can be sent to the Spotify Accounts service in place of an authorization code,
null if the token was created using a method that does not support token refresh
public java.util.List<com.adamratzman.spotify.SpotifyScope> getScopes()+
A list of scopes granted access for this
accessToken. Anempty list means that the token can only be used to acces public information.
public java.lang.String component1()+
An access token that can be provided in subsequent calls,
for example to Spotify Web API services.
public java.lang.String component2()+
How the access token may be used
: always “Bearer”.
public int component3()+
The time period
(in seconds) for which the access token is valid.
public java.lang.String component4()+
A token that can be sent to the Spotify Accounts service in place of an authorization code,
null if the token was created using a method that does not support token refresh
public java.util.List<com.adamratzman.spotify.SpotifyScope> component6()+
A list of scopes granted access for this
accessToken. Anempty list means that the token can only be used to acces public information.
public Token copy(java.lang.String accessToken, + java.lang.String tokenType, + int expiresIn, + java.lang.String refreshToken, + java.lang.String scopeString, + java.util.List<? extends com.adamratzman.spotify.SpotifyScope> scopes)+
Represents a Spotify Token, retrieved through instantiating a SpotifyAPI
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TokenValidityResponse
+Constructor and Description | +
---|
TokenValidityResponse(boolean isValid,
+ java.lang.Exception exception) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+component1() |
+
java.lang.Exception |
+component2() |
+
TokenValidityResponse |
+copy(boolean isValid,
+ java.lang.Exception exception) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.Exception |
+getException() |
+
int |
+hashCode() |
+
boolean |
+isValid() |
+
java.lang.String |
+toString() |
+
public TokenValidityResponse(boolean isValid, + java.lang.Exception exception)+
public boolean isValid()+
public java.lang.Exception getException()+
public boolean component1()+
public java.lang.Exception component2()+
public TokenValidityResponse copy(boolean isValid, + java.lang.Exception exception)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Track
+extends RelinkingAvailableResponse
+Represents a music track on Spotify
Constructor and Description | +
---|
Track(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.util.Map<java.lang.String,java.lang.String> _externalIds,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ SimpleAlbum album,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ boolean isPlayable,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ LinkedTrack linked_from,
+ java.lang.String name,
+ int popularity,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.Boolean isLocal,
+ Restrictions restrictions)
+Represents a music track on Spotify
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component10()
+The disc number
+ |
+
int |
+component11()
+The track length in milliseconds.
+ |
+
boolean |
+component12()
+Whether or not the track has explicit lyrics
+ |
+
java.lang.String |
+component14()
+The name of the track.
+ |
+
int |
+component15()
+The popularity of the track.
+ |
+
java.lang.String |
+component16()
+A link to a 30 second preview
+ |
+
int |
+component17()
+The number of the track.
+ |
+
java.lang.String |
+component18()
+The object type
+ |
+
java.lang.Boolean |
+component19()
+Whether or not the track is from a local file.
+ |
+
Restrictions |
+component20()
+Part of the response when Track Relinking is applied,
+ |
+
SimpleAlbum |
+component7()
+The album on which the track appears.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component8()
+The artists who performed the track.
+ |
+
boolean |
+component9()
+Part of the response when Track Relinking is applied.
+ |
+
Track |
+copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls,
+ java.util.Map<java.lang.String,java.lang.String> _externalIds,
+ java.util.List<java.lang.String> _availableMarkets,
+ java.lang.String _href,
+ java.lang.String _id,
+ java.lang.String _uri,
+ SimpleAlbum album,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ boolean isPlayable,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ LinkedTrack linked_from,
+ java.lang.String name,
+ int popularity,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.Boolean isLocal,
+ Restrictions restrictions)
+Represents a music track on Spotify
+ |
+
boolean |
+equals(java.lang.Object p) |
+
SimpleAlbum |
+getAlbum()
+The album on which the track appears.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists who performed the track.
+ |
+
java.util.List<com.neovisionaries.i18n.CountryCode> |
+getAvailableMarkets()
+A list of the countries in which the track can be played, identified by their ISO 3166-1 alpha-2 code.
+ |
+
int |
+getDiscNumber()
+The disc number
+ |
+
int |
+getDurationMs()
+The track length in milliseconds.
+ |
+
boolean |
+getExplicit()
+Whether or not the track has explicit lyrics
+ |
+
java.util.List<com.adamratzman.spotify.models.ExternalId> |
+getExternalIds()
+External IDs for this track.
+ |
+
java.lang.String |
+getName()
+The name of the track.
+ |
+
int |
+getPopularity()
+The popularity of the track.
+ |
+
java.lang.String |
+getPreviewUrl()
+A link to a 30 second preview
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+getTrackNumber()
+The number of the track.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
int |
+hashCode() |
+
java.lang.Boolean |
+isLocal()
+Whether or not the track is from a local file.
+ |
+
boolean |
+isPlayable()
+Part of the response when Track Relinking is applied.
+ |
+
java.lang.String |
+toString() |
+
getLinkedTrack, isRelinked
getExternalUrls, getUri
getId
getHref, getId
public Track(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.util.Map<java.lang.String,java.lang.String> _externalIds, + java.util.List<java.lang.String> _availableMarkets, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + SimpleAlbum album, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + boolean isPlayable, + int discNumber, + int durationMs, + boolean explicit, + LinkedTrack linked_from, + java.lang.String name, + int popularity, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.Boolean isLocal, + Restrictions restrictions)+
Represents a music track on Spotify
album
- The album on which the track appears. The album object includes a link inhref to full information about the album.artists
- The artists who performed the track. Each artist object includes a link in hrefto more detailed information about the artist.isPlayable
- Part of the response when Track Relinking is applied. If true , the track is playable in thegiven market. Otherwise false.discNumber
- The disc number (usually 1 unless the album consists of more than one disc).durationMs
- The track length in milliseconds.explicit
- Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).name
- The name of the track.popularity
- The popularity of the track. The value will be between 0 and 100, with 100 being the mostpopular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularityis calculated by algorithm and is based, in the most part, on the total number of plays the track has had and howrecent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularitythan songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album)are rated independently. Artist and album popularity is derived mathematically from track popularity. Note thatthe popularity value may lag actual popularity by a few days: the value is not updated in real time.previewUrl
- A link to a 30 second preview (MP3 format) of the track. Can be nulltrackNumber
- The number of the track. If an album has several discs, the track number is the number on the specified disc.type
- The object type: “track”.isLocal
- Whether or not the track is from a local file.restrictions
- Part of the response when Track Relinking is applied, the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}public java.util.List<com.neovisionaries.i18n.CountryCode> getAvailableMarkets()+
A list of the countries in which the track can be played, identified by their ISO 3166-1 alpha-2 code.
public java.util.List<com.adamratzman.spotify.models.ExternalId> getExternalIds()+
External IDs for this track.
public SimpleAlbum getAlbum()+
The album on which the track appears.
The album object includes a link inhref to full information about the album.
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists who performed the track.
Each artist object includes a link in hrefto more detailed information about the artist.
public boolean isPlayable()+
Part of the response when Track Relinking is applied.
If true , the track is playable in thegiven market. Otherwise false.
public int getDiscNumber()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int getDurationMs()+
The track length in milliseconds.
public boolean getExplicit()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public java.lang.String getName()+
The name of the track.
public int getPopularity()+
The popularity of the track.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularityis calculated by algorithm and is based, in the most part, on the total number of plays the track has had and howrecent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularitythan songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album)are rated independently. Artist and album popularity is derived mathematically from track popularity. Note thatthe popularity value may lag actual popularity by a few days: the value is not updated in real time.
public java.lang.String getPreviewUrl()+
A link to a 30 second preview
(MP3 format) of the track. Can be null
public int getTrackNumber()+
The number of the track.
If an album has several discs, the track number is the number on the specified disc.
public java.lang.String getType()+
The object type
: “track”.
public java.lang.Boolean isLocal()+
Whether or not the track is from a local file.
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public SimpleAlbum component7()+
The album on which the track appears.
The album object includes a link inhref to full information about the album.
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component8()+
The artists who performed the track.
Each artist object includes a link in hrefto more detailed information about the artist.
public boolean component9()+
Part of the response when Track Relinking is applied.
If true , the track is playable in thegiven market. Otherwise false.
public int component10()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int component11()+
The track length in milliseconds.
public boolean component12()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public java.lang.String component14()+
The name of the track.
public int component15()+
The popularity of the track.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularityis calculated by algorithm and is based, in the most part, on the total number of plays the track has had and howrecent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularitythan songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album)are rated independently. Artist and album popularity is derived mathematically from track popularity. Note thatthe popularity value may lag actual popularity by a few days: the value is not updated in real time.
public java.lang.String component16()+
A link to a 30 second preview
(MP3 format) of the track. Can be null
public int component17()+
The number of the track.
If an album has several discs, the track number is the number on the specified disc.
public java.lang.String component18()+
The object type
: “track”.
public java.lang.Boolean component19()+
Whether or not the track is from a local file.
public Restrictions component20()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public Track copy(java.util.Map<java.lang.String,java.lang.String> _externalUrls, + java.util.Map<java.lang.String,java.lang.String> _externalIds, + java.util.List<java.lang.String> _availableMarkets, + java.lang.String _href, + java.lang.String _id, + java.lang.String _uri, + SimpleAlbum album, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + boolean isPlayable, + int discNumber, + int durationMs, + boolean explicit, + LinkedTrack linked_from, + java.lang.String name, + int popularity, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.Boolean isLocal, + Restrictions restrictions)+
Represents a music track on Spotify
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TrackAnalysis
+General information about the track as a whole
Constructor and Description | +
---|
TrackAnalysis(int numSamples,
+ float duration,
+ java.lang.String sampleMd5,
+ int offsetSeconds,
+ int windowSeconds,
+ int analysisSampleRate,
+ int analysisChannels,
+ float endOfFadeIn,
+ float startOfFadeOut,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int timeSignature,
+ float timeSignatureConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ java.lang.String codestring,
+ float codeVersion,
+ java.lang.String echoprintstring,
+ float echoprintVersion,
+ java.lang.String synchstring,
+ float synchVersion,
+ java.lang.String rhythmstring,
+ float rhythmVersion)
+General information about the track as a whole
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component1() |
+
float |
+component10() |
+
float |
+component11() |
+
float |
+component12() |
+
int |
+component13() |
+
float |
+component14() |
+
int |
+component15() |
+
float |
+component16() |
+
int |
+component17() |
+
float |
+component18() |
+
java.lang.String |
+component19() |
+
float |
+component2() |
+
float |
+component20() |
+
java.lang.String |
+component21() |
+
float |
+component22() |
+
java.lang.String |
+component23() |
+
float |
+component24() |
+
java.lang.String |
+component25() |
+
float |
+component26() |
+
java.lang.String |
+component3() |
+
int |
+component4() |
+
int |
+component5() |
+
int |
+component6() |
+
int |
+component7() |
+
float |
+component8() |
+
float |
+component9() |
+
TrackAnalysis |
+copy(int numSamples,
+ float duration,
+ java.lang.String sampleMd5,
+ int offsetSeconds,
+ int windowSeconds,
+ int analysisSampleRate,
+ int analysisChannels,
+ float endOfFadeIn,
+ float startOfFadeOut,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int timeSignature,
+ float timeSignatureConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ java.lang.String codestring,
+ float codeVersion,
+ java.lang.String echoprintstring,
+ float echoprintVersion,
+ java.lang.String synchstring,
+ float synchVersion,
+ java.lang.String rhythmstring,
+ float rhythmVersion)
+General information about the track as a whole
+ |
+
boolean |
+equals(java.lang.Object p) |
+
int |
+getAnalysisChannels() |
+
int |
+getAnalysisSampleRate() |
+
float |
+getCodeVersion() |
+
java.lang.String |
+getCodestring() |
+
float |
+getDuration() |
+
float |
+getEchoprintVersion() |
+
java.lang.String |
+getEchoprintstring() |
+
float |
+getEndOfFadeIn() |
+
int |
+getKey() |
+
float |
+getKeyConfidence() |
+
float |
+getLoudness() |
+
int |
+getMode() |
+
float |
+getModeConfidence() |
+
int |
+getNumSamples() |
+
int |
+getOffsetSeconds() |
+
float |
+getRhythmVersion() |
+
java.lang.String |
+getRhythmstring() |
+
java.lang.String |
+getSampleMd5() |
+
float |
+getStartOfFadeOut() |
+
float |
+getSynchVersion() |
+
java.lang.String |
+getSynchstring() |
+
float |
+getTempo() |
+
float |
+getTempoConfidence() |
+
int |
+getTimeSignature() |
+
float |
+getTimeSignatureConfidence() |
+
int |
+getWindowSeconds() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public TrackAnalysis(int numSamples, + float duration, + java.lang.String sampleMd5, + int offsetSeconds, + int windowSeconds, + int analysisSampleRate, + int analysisChannels, + float endOfFadeIn, + float startOfFadeOut, + float loudness, + float tempo, + float tempoConfidence, + int timeSignature, + float timeSignatureConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + java.lang.String codestring, + float codeVersion, + java.lang.String echoprintstring, + float echoprintVersion, + java.lang.String synchstring, + float synchVersion, + java.lang.String rhythmstring, + float rhythmVersion)+
General information about the track as a whole
public int getNumSamples()+
public float getDuration()+
public java.lang.String getSampleMd5()+
public int getOffsetSeconds()+
public int getWindowSeconds()+
public int getAnalysisSampleRate()+
public int getAnalysisChannels()+
public float getEndOfFadeIn()+
public float getStartOfFadeOut()+
public float getLoudness()+
public float getTempo()+
public float getTempoConfidence()+
public int getTimeSignature()+
public float getTimeSignatureConfidence()+
public int getKey()+
public float getKeyConfidence()+
public int getMode()+
public float getModeConfidence()+
public java.lang.String getCodestring()+
public float getCodeVersion()+
public java.lang.String getEchoprintstring()+
public float getEchoprintVersion()+
public java.lang.String getSynchstring()+
public float getSynchVersion()+
public java.lang.String getRhythmstring()+
public float getRhythmVersion()+
public int component1()+
public float component2()+
public java.lang.String component3()+
public int component4()+
public int component5()+
public int component6()+
public int component7()+
public float component8()+
public float component9()+
public float component10()+
public float component11()+
public float component12()+
public int component13()+
public float component14()+
public int component15()+
public float component16()+
public int component17()+
public float component18()+
public java.lang.String component19()+
public float component20()+
public java.lang.String component21()+
public float component22()+
public java.lang.String component23()+
public float component24()+
public java.lang.String component25()+
public float component26()+
public TrackAnalysis copy(int numSamples, + float duration, + java.lang.String sampleMd5, + int offsetSeconds, + int windowSeconds, + int analysisSampleRate, + int analysisChannels, + float endOfFadeIn, + float startOfFadeOut, + float loudness, + float tempo, + float tempoConfidence, + int timeSignature, + float timeSignatureConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + java.lang.String codestring, + float codeVersion, + java.lang.String echoprintstring, + float echoprintVersion, + java.lang.String synchstring, + float synchVersion, + java.lang.String rhythmstring, + float rhythmVersion)+
General information about the track as a whole
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TrackURI
+extends SpotifyUri
+Represents a Spotify Track URI, parsed from either a Spotify ID or taken from an endpoint.
public class UnNullableException
+Constructor and Description | +
---|
UnNullableException(java.lang.String message) |
+
public class UserURI
+extends SpotifyUri
+Represents a Spotify User URI, parsed from either a Spotify ID or taken from an endpoint.
public class VideoThumbnail
+Constructor and Description | +
---|
VideoThumbnail(java.lang.String url) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
VideoThumbnail |
+copy(java.lang.String url) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getUrl() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public VideoThumbnail(java.lang.String url)+
public java.lang.String getUrl()+
public java.lang.String component1()+
public VideoThumbnail copy(java.lang.String url)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
Interface | +Description | +
---|---|
ResultEnum | ++ |
Class | +Description | +
---|---|
AbstractPagingObject<T> | ++ |
Album | +
+ Represents an Album on Spotify
+ |
+
AlbumURI | +
+ Represents a Spotify Album URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
Artist | +
+ Represents an Artist (distinct from a regular user) on Spotify
+ |
+
ArtistURI | +
+ Represents a Spotify Artist URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
AudioAnalysis | +
+ The Audio Analysis endpoint provides low-level audio analysis for all of the tracks
+in the Spotify catalog. The Audio Analysis describes the track’s structure
+and musical content, including rhythm, pitch, and timbre. All information is
+precise to the audio sample. Many elements of analysis include confidence values,
+a floating-point number ranging from 0.0 to 1.0. Confidence indicates the reliability
+of its corresponding attribute. Elements carrying a small confidence value should
+be considered speculative. There may not be sufficient data in the audio to
+compute the attribute with high certainty.
+ |
+
AudioAnalysisMeta | +
+ Information about the analysis run
+ |
+
AudioFeatures | +
+ General attributes of a
+class Track |
+
AudioSection | +
+ Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc.
+Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.*
+ |
+
AudioSegment | +
+ Audio segments attempts to subdivide a song into many segments, with each segment containing
+a roughly consistent sound throughout its duration.
+ |
+
AuthenticationError | ++ |
Context | +
+ Puts an object in-context by linking to other related endpoints
+ |
+
CoreObject | +
+ Represents a core Spotify object such as a Track or Album
+ |
+
CurrentlyPlayingContext | +
+ Information about the current playback
+ |
+
CurrentlyPlayingObject | +
+ Information about the currently playing track and context
+ |
+
Cursor | +
+ The cursor to use as key to find the next (or previous) page of items.
+ |
+
CursorBasedPagingObject<T> | +
+ The cursor-based paging object is a container for a set of objects. It contains a key called
+items (whose value is an array of the requested objects) along with other keys like next and
+cursors that can be useful in future calls.
+ |
+
Device | +
+ A device which is connected to the Spotify user
+ |
+
DisallowablePlaybackAction | +
+ Maps a playback action to whether the user is disallowed from doing it
+ |
+
ErrorObject | +
+ An endpoint exception from Spotify
+ |
+
ErrorResponse | +
+ Wraps around
+class ErrorObject |
+
ExternalId | +
+ An external id linked to the result object
+ |
+
ExternalUrl | ++ |
FeaturedPlaylists | +
+ Spotify featured playlists (on the Browse tab)
+ |
+
Followers | +
+ Information about a Spotify user's followers
+ |
+
Identifiable | +
+ Represents an identifiable Spotify object such as an Album or Recommendation Seed
+ |
+
IdentifiableNullable | +
+ Represents an identifiable Spotify object such as an Album or Recommendation Seed
+ |
+
LinkedTrack | +
+ Represents a relinked track. This is playable in the
+searched market. If null, the API result is playable in the market.
+ |
+
LocalTrackURI | +
+ Represents a Spotify local track URI
+ |
+
NeedsApi | +
+ Provide access to the underlying
+class SpotifyAPI |
+
PagingObject<T> | +
+ The offset-based paging object is a container for a set of objects. It contains a key called items
+(whose value is an array of the requested objects) along with other keys like previous, next and
+limit that can be useful in future calls.
+ |
+
PagingObjectsKt | ++ |
PlayHistory | +
+ Information about a previously-played track
+ |
+
PlayHistoryContext | +
+ Context in which a track was played
+ |
+
PlaybackActions | +
+ List of playback actions (pause, resume, etc) which a user is disallowed or allowed to do. Playback actions
+NOT in
+PlaybackActions.getDisallows are allowed. |
+
Playlist | +
+ Represents a Playlist on Spotify
+ |
+
PlaylistTrack | +
+ Represents a Spotify track inside a
+class Playlist |
+
PlaylistTrackInfo | +
+ A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks
+can be retrieved, along with the total number of tracks in the playlist.
+ |
+
PlaylistURI | +
+ Represents a Spotify Playlist URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
RecommendationResponse | ++ |
RecommendationSeed | +
+ Seed from which the recommendation was constructed
+ |
+
RelinkingAvailableResponse | ++ |
Restrictions | +
+ Contains an explanation of why a track is not available
+ |
+
ResultObjectsKt | ++ |
SavedAlbum | +
+ Represents an album saved in a user's library
+ |
+
SavedTrack | +
+ Represents a track saved in a user's library
+ |
+
SimpleAlbum | +
+ Simplified Album object that can be used to retrieve a full
+class Album |
+
SimpleArtist | +
+ Simplified Artist object that can be used to retrieve a full
+class Artist |
+
SimplePlaylist | +
+ Simplified Playlist object that can be used to retrieve a full
+class Playlist |
+
SimpleTrack | +
+ Simplified Playlist object that can be used to retrieve a full
+class Playlist |
+
SpotifyCategory | +
+ Spotify music category
+ |
+
SpotifyCopyright | +
+ Describes an album's copyright information
+ |
+
SpotifyImage | +
+ A Spotify image
+ |
+
SpotifyPublicUser | +
+ Public information about a Spotify user
+ |
+
SpotifySearchResult | ++ |
SpotifyUri | +
+ Represents a Spotify URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
SpotifyUrisKt | ++ |
SpotifyUserInformation | +
+ Private information about a Spotify user. Each field may require a specific scope.
+ |
+
TimeInterval | +
+ This is a generic object used to represent various time intervals within Audio Analysis.
+ |
+
Token | +
+ Represents a Spotify Token, retrieved through instantiating a SpotifyAPI
+ |
+
TokenValidityResponse | ++ |
Track | +
+ Represents a music track on Spotify
+ |
+
TrackAnalysis | +
+ General information about the track as a whole
+ |
+
TrackURI | +
+ Represents a Spotify Track URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
UserURI | +
+ Represents a Spotify User URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
VideoThumbnail | ++ |
Enum | +Description | +
---|---|
AlbumResultType | +
+ Album search type
+ |
+
CopyrightType | +
+ Copyright statement type of an Album
+ |
+
CurrentlyPlayingType | +
+ The object type of the currently playing item
+ |
+
DeviceType | +
+ Electronic type of registered Spotify device
+ |
+
PagingTraversalType | ++ |
PlaybackAction | +
+ Action a user takes that will affect current playback
+ |
+
RepeatState | +
+ How and if playback is repeating
+ |
+
Exception | +Description | +
---|---|
BadRequestException | +
+ Thrown when a request fails
+ |
+
SpotifyAuthenticationException | ++ |
SpotifyRatelimitedException | +
+ Thrown when SpotifyAPI.retryWhenRateLimited is false and requests have been ratelimited
+ |
+
SpotifyUriException | ++ |
UnNullableException | ++ |
Class | +Description | +
---|---|
BuilderKt | ++ |
SpotifyAPI | +
+ Represents an instance of the Spotify API client, with common
+functionality and information between the
+class SpotifyClientAPI and class SpotifyAppAPI
+implementations of the API |
+
SpotifyAPIKt | ++ |
SpotifyApiBuilder | +
+ Spotify traditional Java style API builder
+ |
+
SpotifyApiBuilderDsl | +
+ Spotify API mutable parameters
+ |
+
SpotifyAppAPI | +
+ An API instance created with application credentials, not through
+client authentication
+ |
+
SpotifyClientAPI | +
+ An API instance created through client authentication, with access to private information
+managed through the scopes exposed in token
+ |
+
SpotifyCredentials | ++ |
SpotifyCredentialsBuilder | +
+ A holder for application-specific credentials
+ |
+
SpotifyLogger | ++ |
SpotifyRestAction<T> | +
+ Provides a uniform interface to retrieve, whether synchronously or asynchronously, T from Spotify
+ |
+
SpotifyRestActionPaging<Z,T extends AbstractPagingObject<Z>> | ++ |
SpotifyUserAuthorization | ++ |
SpotifyUserAuthorizationBuilder | +
+ Authentication methods
+ |
+
SpotifyUtilities | ++ |
SpotifyUtilitiesBuilder | +
+ API Utilities
+ |
+
Enum | +Description | +
---|---|
AuthorizationType | ++ |
SpotifyScope | +
+ Scopes provide Spotify users using third-party apps the confidence
+that only the information they choose to share will be shared, and nothing more.
+ |
+
Exception | +Description | +
---|---|
SpotifyException | ++ |
public class AbstractPagingObject<T>
+Modifier and Type | +Field and Description | +
---|---|
java.lang.Class<T> |
+itemClazz |
+
Constructor and Description | +
---|
AbstractPagingObject(java.lang.String href,
+ java.util.List<? extends T> items,
+ int limit,
+ java.lang.String next,
+ int offset,
+ java.lang.String previous,
+ int total) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getHref()
+A link to the Web API endpoint returning the full result of the request.
+ |
+
java.lang.Class<T> |
+getItemClazz() |
+
java.util.List<T> |
+getItems()
+The requested data.
+ |
+
int |
+getLimit()
+The maximum number of items in the response
+ |
+
java.lang.String |
+getNext()
+URL to the next page of items.
+ |
+
int |
+getOffset()
+The offset of the items returned
+ |
+
java.lang.String |
+getPrevious()
+URL to the previous page of items.
+ |
+
int |
+getTotal()
+The maximum number of items available to return.
+ |
+
void |
+setItemClazz(java.lang.Class<T> p) |
+
public AbstractPagingObject(java.lang.String href, + java.util.List<? extends T> items, + int limit, + java.lang.String next, + int offset, + java.lang.String previous, + int total)+
href
- A link to the Web API endpoint returning the full result of the request.items
- The requested data.limit
- The maximum number of items in the response (as set in the query or by default).next
- URL to the next page of items. ( null if none)offset
- The offset of the items returned (as set in the query or by default).previous
- URL to the previous page of items. ( null if none)total
- The maximum number of items available to return.public java.lang.Class<T> getItemClazz()+
public void setItemClazz(java.lang.Class<T> p)+
public java.lang.String getHref()+
A link to the Web API endpoint returning the full result of the request.
public java.util.List<T> getItems()+
The requested data.
public int getLimit()+
The maximum number of items in the response
(as set in the query or by default).
public java.lang.String getNext()+
URL to the next page of items.
( null if none)
public int getOffset()+
The offset of the items returned
(as set in the query or by default).
public java.lang.String getPrevious()+
URL to the previous page of items.
( null if none)
public int getTotal()+
The maximum number of items available to return.
public class Album
+Constructor and Description | +
---|
Album(java.lang.String _albumType,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights,
+ java.util.Map<java.lang.String,java.lang.String> externalIds,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ java.util.List<java.lang.String> genres,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String label,
+ java.lang.String name,
+ int popularity,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks,
+ java.lang.String type,
+ java.lang.String _uri,
+ AlbumURI uri,
+ int totalTracks,
+ Restrictions restrictions,
+ AlbumResultType albumType) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component10()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+component11()
+The label for the album.
+ |
+
java.lang.String |
+component12()
+The name of the album.
+ |
+
int |
+component13()
+The popularity of the album.
+ |
+
java.lang.String |
+component14()
+The date the album was first released,
+ |
+
java.lang.String |
+component15()
+The precision with which release
+ |
+
PagingObject<com.adamratzman.spotify.models.SimpleTrack> |
+component16()
+The tracks of the album.
+ |
+
java.lang.String |
+component17()
+The object type
+ |
+
AlbumURI |
+component19()
+The Spotify URI for the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component2()
+The artists of the album.
+ |
+
int |
+component20()
+the total amount of tracks in this album
+ |
+
Restrictions |
+component21()
+Part of the response when Track Relinking is applied,
+ |
+
AlbumResultType |
+component22()
+The type of the album
+ |
+
java.util.List<java.lang.String> |
+component3()
+The markets in which the album is available
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> |
+component4()
+The copyright statements of the album.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+component5()
+Known external IDs for the album.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+component6()
+Known external URLs for this album.
+ |
+
java.util.List<java.lang.String> |
+component7()
+A list of the genres used to classify the album.
+ |
+
java.lang.String |
+component8()
+A link to the Web API endpoint providing full details of the album.
+ |
+
java.lang.String |
+component9()
+The Spotify ID for the album.
+ |
+
Album |
+copy(java.lang.String _albumType,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights,
+ java.util.Map<java.lang.String,java.lang.String> externalIds,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ java.util.List<java.lang.String> genres,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String label,
+ java.lang.String name,
+ int popularity,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks,
+ java.lang.String type,
+ java.lang.String _uri,
+ AlbumURI uri,
+ int totalTracks,
+ Restrictions restrictions,
+ AlbumResultType albumType) |
+
boolean |
+equals(java.lang.Object p) |
+
AlbumResultType |
+getAlbumType()
+The type of the album
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists of the album.
+ |
+
java.util.List<java.lang.String> |
+getAvailableMarkets()
+The markets in which the album is available
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> |
+getCopyrights()
+The copyright statements of the album.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+getExternalIds()
+Known external IDs for the album.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this album.
+ |
+
java.util.List<java.lang.String> |
+getGenres()
+A list of the genres used to classify the album.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the album.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the album.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+getLabel()
+The label for the album.
+ |
+
java.lang.String |
+getName()
+The name of the album.
+ |
+
int |
+getPopularity()
+The popularity of the album.
+ |
+
java.lang.String |
+getReleaseDate()
+The date the album was first released,
+ |
+
java.lang.String |
+getReleaseDatePrecision()
+The precision with which release
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+getTotalTracks()
+the total amount of tracks in this album
+ |
+
PagingObject<com.adamratzman.spotify.models.SimpleTrack> |
+getTracks()
+The tracks of the album.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
AlbumURI |
+getUri()
+The Spotify URI for the album.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Album(java.lang.String _albumType, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights, + java.util.Map<java.lang.String,java.lang.String> externalIds, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + java.util.List<java.lang.String> genres, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String label, + java.lang.String name, + int popularity, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks, + java.lang.String type, + java.lang.String _uri, + AlbumURI uri, + int totalTracks, + Restrictions restrictions, + AlbumResultType albumType)+
artists
- The artists of the album. Each artist object includes a link in href to more detailedinformation about the artist.availableMarkets
- The markets in which the album is available:ISO 3166-1 alpha-2 country codes. Note that an album is consideredavailable in a market when at least 1 of its tracks is available in that market.copyrights
- The copyright statements of the album.externalIds
- Known external IDs for the album.externalUrls
- Known external URLs for this album.genres
- A list of the genres used to classify the album. For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)href
- A link to the Web API endpoint providing full details of the album.id
- The Spotify ID for the album.images
- The cover art for the album in various sizes, widest first.label
- The label for the album.name
- The name of the album. In case of an album takedown, the value may be an empty string.popularity
- The popularity of the album. The value will be between 0 and 100, with 100 being the mostpopular. The popularity is calculated from the popularity of the album’s individual tracks.releaseDate
- The date the album was first released, for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.releaseDatePrecision
- The precision with which release_date value is known: year , month , or day.tracks
- The tracks of the album.type
- The object type: “album”uri
- The Spotify URI for the album.totalTracks
- the total amount of tracks in this albumrestrictions
- Part of the response when Track Relinking is applied, the original track is not availablein the given market, and Spotify did not have any tracks to relink it with.The track response will still contain metadata for the original track, and arestrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}albumType
- The type of the album: one of "album" , "single" , or "compilation".public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists of the album.
Each artist object includes a link in href to more detailedinformation about the artist.
public java.util.List<java.lang.String> getAvailableMarkets()+
The markets in which the album is available
:ISO 3166-1 alpha-2 country codes. Note that an album is consideredavailable in a market when at least 1 of its tracks is available in that market.
public java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> getCopyrights()+
The copyright statements of the album.
public java.util.Map<java.lang.String,java.lang.String> getExternalIds()+
Known external IDs for the album.
public java.util.Map<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this album.
public java.util.List<java.lang.String> getGenres()+
A list of the genres used to classify the album.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the album.
public java.lang.String getId()+
The Spotify ID for the album.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The cover art for the album in various sizes,
widest first.
public java.lang.String getLabel()+
The label for the album.
public java.lang.String getName()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public int getPopularity()+
The popularity of the album.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity is calculated from the popularity of the album’s individual tracks.
public java.lang.String getReleaseDate()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String getReleaseDatePrecision()+
The precision with which release
_date value is known: year , month , or day.
public PagingObject<com.adamratzman.spotify.models.SimpleTrack> getTracks()+
The tracks of the album.
public java.lang.String getType()+
The object type
: “album”
public AlbumURI getUri()+
The Spotify URI for the album.
public int getTotalTracks()+
the total amount of tracks in this album
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with.The track response will still contain metadata for the original track, and arestrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}
public AlbumResultType getAlbumType()+
The type of the album
: one of "album" , "single" , or "compilation".
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component2()+
The artists of the album.
Each artist object includes a link in href to more detailedinformation about the artist.
public java.util.List<java.lang.String> component3()+
The markets in which the album is available
:ISO 3166-1 alpha-2 country codes. Note that an album is consideredavailable in a market when at least 1 of its tracks is available in that market.
public java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> component4()+
The copyright statements of the album.
public java.util.Map<java.lang.String,java.lang.String> component5()+
Known external IDs for the album.
public java.util.Map<java.lang.String,java.lang.String> component6()+
Known external URLs for this album.
public java.util.List<java.lang.String> component7()+
A list of the genres used to classify the album.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.lang.String component8()+
A link to the Web API endpoint providing full details of the album.
public java.lang.String component9()+
The Spotify ID for the album.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component10()+
The cover art for the album in various sizes,
widest first.
public java.lang.String component11()+
The label for the album.
public java.lang.String component12()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public int component13()+
The popularity of the album.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity is calculated from the popularity of the album’s individual tracks.
public java.lang.String component14()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String component15()+
The precision with which release
_date value is known: year , month , or day.
public PagingObject<com.adamratzman.spotify.models.SimpleTrack> component16()+
The tracks of the album.
public java.lang.String component17()+
The object type
: “album”
public AlbumURI component19()+
The Spotify URI for the album.
public int component20()+
the total amount of tracks in this album
public Restrictions component21()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with.The track response will still contain metadata for the original track, and arestrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"}
public AlbumResultType component22()+
The type of the album
: one of "album" , "single" , or "compilation".
public Album copy(java.lang.String _albumType, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + java.util.List<com.adamratzman.spotify.models.SpotifyCopyright> copyrights, + java.util.Map<java.lang.String,java.lang.String> externalIds, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + java.util.List<java.lang.String> genres, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String label, + java.lang.String name, + int popularity, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + PagingObject<com.adamratzman.spotify.models.SimpleTrack> tracks, + java.lang.String type, + java.lang.String _uri, + AlbumURI uri, + int totalTracks, + Restrictions restrictions, + AlbumResultType albumType)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum AlbumResultType
+Album type
Enum Constant and Description | +
---|
ALBUM |
+
APPEARS_ON |
+
COMPILATION |
+
SINGLE |
+
public static AlbumResultType ALBUM+
public static AlbumResultType SINGLE+
public static AlbumResultType COMPILATION+
public static AlbumResultType APPEARS_ON+
public class AlbumURI
+extends SpotifyUri
+Represents a Spotify Album URI, parsed from either a Spotify ID or taken from an endpoint.
Constructor and Description | +
---|
AlbumURI(java.lang.String input)
+Represents a Spotify Album URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
getId, getUri
public class Artist
+Constructor and Description | +
---|
Artist(java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.util.List<java.lang.String> genres,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ int popularity,
+ java.lang.String type,
+ java.lang.String _uri,
+ ArtistURI uri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.HashMap<java.lang.String,java.lang.String> |
+component1()
+Known external URLs for this artist.
+ |
+
ArtistURI |
+component11()
+The Spotify URI for the artist.
+ |
+
Followers |
+component2()
+Information about the followers of the artist.
+ |
+
java.util.List<java.lang.String> |
+component3()
+A list of the genres the artist is associated with.
+ |
+
java.lang.String |
+component4()
+A link to the Web API endpoint providing full details of the artist.
+ |
+
java.lang.String |
+component5()
+The Spotify ID for the artist.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component6()
+Images of the artist in various sizes,
+ |
+
java.lang.String |
+component7()
+The name of the artist
+ |
+
int |
+component8()
+The popularity of the artist.
+ |
+
java.lang.String |
+component9()
+The object type
+ |
+
Artist |
+copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.util.List<java.lang.String> genres,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ int popularity,
+ java.lang.String type,
+ java.lang.String _uri,
+ ArtistURI uri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this artist.
+ |
+
Followers |
+getFollowers()
+Information about the followers of the artist.
+ |
+
java.util.List<java.lang.String> |
+getGenres()
+A list of the genres the artist is associated with.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the artist.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the artist.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+Images of the artist in various sizes,
+ |
+
java.lang.String |
+getName()
+The name of the artist
+ |
+
int |
+getPopularity()
+The popularity of the artist.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
ArtistURI |
+getUri()
+The Spotify URI for the artist.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Artist(java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.util.List<java.lang.String> genres, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + int popularity, + java.lang.String type, + java.lang.String _uri, + ArtistURI uri)+
externalUrls
- Known external URLs for this artist.followers
- Information about the followers of the artist.genres
- A list of the genres the artist is associated with. For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)href
- A link to the Web API endpoint providing full details of the artist.id
- The Spotify ID for the artist.images
- Images of the artist in various sizes, widest first.name
- The name of the artistpopularity
- The popularity of the artist. The value will be between 0 and 100, with 100 being the mostpopular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.type
- The object type: "artist"uri
- The Spotify URI for the artist.public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this artist.
public Followers getFollowers()+
Information about the followers of the artist.
public java.util.List<java.lang.String> getGenres()+
A list of the genres the artist is associated with.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the artist.
public java.lang.String getId()+
The Spotify ID for the artist.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
Images of the artist in various sizes,
widest first.
public java.lang.String getName()+
The name of the artist
public int getPopularity()+
The popularity of the artist.
The value will be between 0 and 100, with 100 being the mostpopular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.
public java.lang.String getType()+
The object type
: "artist"
public ArtistURI getUri()+
The Spotify URI for the artist.
public java.util.HashMap<java.lang.String,java.lang.String> component1()+
Known external URLs for this artist.
public Followers component2()+
Information about the followers of the artist.
public java.util.List<java.lang.String> component3()+
A list of the genres the artist is associated with.
For example: "Prog Rock" ,"Post-Grunge". (If not yet classified, the array is empty.)
public java.lang.String component4()+
A link to the Web API endpoint providing full details of the artist.
public java.lang.String component5()+
The Spotify ID for the artist.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component6()+
Images of the artist in various sizes,
widest first.
public java.lang.String component7()+
The name of the artist
public int component8()+
The popularity of the artist.
The value will be between 0 and 100, with 100 being the mostpopular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.
public java.lang.String component9()+
The object type
: "artist"
public ArtistURI component11()+
The Spotify URI for the artist.
public Artist copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.util.List<java.lang.String> genres, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + int popularity, + java.lang.String type, + java.lang.String _uri, + ArtistURI uri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ArtistURI
+extends SpotifyUri
+Represents a Spotify Artist URI, parsed from either a Spotify ID or taken from an endpoint.
Constructor and Description | +
---|
ArtistURI(java.lang.String input)
+Represents a Spotify Artist URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
getId, getUri
public class AudioAnalysis
+Constructor and Description | +
---|
AudioAnalysis(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> beats,
+ AudioAnalysisMeta meta,
+ java.util.List<com.adamratzman.spotify.models.AudioSection> sections,
+ java.util.List<com.adamratzman.spotify.models.AudioSegment> segments,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums,
+ TrackAnalysis track) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+component1()
+The time intervals of the bars throughout the track.
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+component2()
+The time intervals of beats throughout the track.
+ |
+
AudioAnalysisMeta |
+component3()
+Analysis meta information
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSection> |
+component4()
+Sections are defined by large variations in rhythm or timbre,
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSegment> |
+component5()
+Audio segments attempts to subdivide a song into many segments,
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+component6()
+A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
+ |
+
TrackAnalysis |
+component7()
+An analysis of the track as a whole.
+ |
+
AudioAnalysis |
+copy(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> beats,
+ AudioAnalysisMeta meta,
+ java.util.List<com.adamratzman.spotify.models.AudioSection> sections,
+ java.util.List<com.adamratzman.spotify.models.AudioSegment> segments,
+ java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums,
+ TrackAnalysis track) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+getBars()
+The time intervals of the bars throughout the track.
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+getBeats()
+The time intervals of beats throughout the track.
+ |
+
AudioAnalysisMeta |
+getMeta()
+Analysis meta information
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSection> |
+getSections()
+Sections are defined by large variations in rhythm or timbre,
+ |
+
java.util.List<com.adamratzman.spotify.models.AudioSegment> |
+getSegments()
+Audio segments attempts to subdivide a song into many segments,
+ |
+
java.util.List<com.adamratzman.spotify.models.TimeInterval> |
+getTatums()
+A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
+ |
+
TrackAnalysis |
+getTrack()
+An analysis of the track as a whole.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioAnalysis(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars, + java.util.List<com.adamratzman.spotify.models.TimeInterval> beats, + AudioAnalysisMeta meta, + java.util.List<com.adamratzman.spotify.models.AudioSection> sections, + java.util.List<com.adamratzman.spotify.models.AudioSegment> segments, + java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums, + TrackAnalysis track)+
bars
- The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined asa given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.beats
- The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music;for example, each tick of a metronome. Beats are typically multiples of tatums.meta
- Analysis meta information (limited use)sections
- Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitarsolo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.segments
- Audio segments attempts to subdivide a song into many segments, with each segment containinga roughly consitent sound throughout its duration.tatums
- A tatum represents the lowest regular pulse train that a listener intuitively infers from the timingof perceived musical events (segments).track
- An analysis of the track as a whole. Undocumented on Spotify's side.bars
- The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined as
+a given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.beats
- The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music;
+for example, each tick of a metronome. Beats are typically multiples of tatums.meta
- Analysis meta information (limited use)sections
- Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar
+solo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.segments
- Audio segments attempts to subdivide a song into many segments, with each segment containing
+a roughly consitent sound throughout its duration.tatums
- A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
+of perceived musical events (segments).track
- An analysis of the track as a whole. Undocumented on Spotify's side.public java.util.List<com.adamratzman.spotify.models.TimeInterval> getBars()+
The time intervals of the bars throughout the track.
A bar (or measure) is a segment of time defined asa given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> getBeats()+
The time intervals of beats throughout the track.
A beat is the basic time unit of a piece of music;for example, each tick of a metronome. Beats are typically multiples of tatums.
public AudioAnalysisMeta getMeta()+
Analysis meta information
(limited use)
public java.util.List<com.adamratzman.spotify.models.AudioSection> getSections()+
Sections are defined by large variations in rhythm or timbre,
e.g. chorus, verse, bridge, guitarsolo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.
public java.util.List<com.adamratzman.spotify.models.AudioSegment> getSegments()+
Audio segments attempts to subdivide a song into many segments,
with each segment containinga roughly consitent sound throughout its duration.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> getTatums()+
A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
of perceived musical events (segments).
public TrackAnalysis getTrack()+
An analysis of the track as a whole.
Undocumented on Spotify's side.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> component1()+
The time intervals of the bars throughout the track.
A bar (or measure) is a segment of time defined asa given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> component2()+
The time intervals of beats throughout the track.
A beat is the basic time unit of a piece of music;for example, each tick of a metronome. Beats are typically multiples of tatums.
public AudioAnalysisMeta component3()+
Analysis meta information
(limited use)
public java.util.List<com.adamratzman.spotify.models.AudioSection> component4()+
Sections are defined by large variations in rhythm or timbre,
e.g. chorus, verse, bridge, guitarsolo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.
public java.util.List<com.adamratzman.spotify.models.AudioSegment> component5()+
Audio segments attempts to subdivide a song into many segments,
with each segment containinga roughly consitent sound throughout its duration.
public java.util.List<com.adamratzman.spotify.models.TimeInterval> component6()+
A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
of perceived musical events (segments).
public TrackAnalysis component7()+
An analysis of the track as a whole.
Undocumented on Spotify's side.
public AudioAnalysis copy(java.util.List<com.adamratzman.spotify.models.TimeInterval> bars, + java.util.List<com.adamratzman.spotify.models.TimeInterval> beats, + AudioAnalysisMeta meta, + java.util.List<com.adamratzman.spotify.models.AudioSection> sections, + java.util.List<com.adamratzman.spotify.models.AudioSegment> segments, + java.util.List<com.adamratzman.spotify.models.TimeInterval> tatums, + TrackAnalysis track)+
bars
- The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined as
+a given number of beats. Bar offsets also indicate downbeats, the first beat of the measure.beats
- The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music;
+for example, each tick of a metronome. Beats are typically multiples of tatums.meta
- Analysis meta information (limited use)sections
- Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar
+solo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.segments
- Audio segments attempts to subdivide a song into many segments, with each segment containing
+a roughly consitent sound throughout its duration.tatums
- A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing
+of perceived musical events (segments).track
- An analysis of the track as a whole. Undocumented on Spotify's side.public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioAnalysisMeta
+Constructor and Description | +
---|
AudioAnalysisMeta(java.lang.String analyzerVersion,
+ java.lang.String platform,
+ java.lang.String detailedStatus,
+ int statusCode,
+ long timestamp,
+ float analysisTime,
+ java.lang.String inputProcess) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
java.lang.String |
+component3() |
+
int |
+component4() |
+
long |
+component5() |
+
float |
+component6() |
+
java.lang.String |
+component7() |
+
AudioAnalysisMeta |
+copy(java.lang.String analyzerVersion,
+ java.lang.String platform,
+ java.lang.String detailedStatus,
+ int statusCode,
+ long timestamp,
+ float analysisTime,
+ java.lang.String inputProcess) |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getAnalysisTime() |
+
java.lang.String |
+getAnalyzerVersion() |
+
java.lang.String |
+getDetailedStatus() |
+
java.lang.String |
+getInputProcess() |
+
java.lang.String |
+getPlatform() |
+
int |
+getStatusCode() |
+
long |
+getTimestamp() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioAnalysisMeta(java.lang.String analyzerVersion, + java.lang.String platform, + java.lang.String detailedStatus, + int statusCode, + long timestamp, + float analysisTime, + java.lang.String inputProcess)+
public java.lang.String getAnalyzerVersion()+
public java.lang.String getPlatform()+
public java.lang.String getDetailedStatus()+
public int getStatusCode()+
public long getTimestamp()+
public float getAnalysisTime()+
public java.lang.String getInputProcess()+
public java.lang.String component1()+
public java.lang.String component2()+
public java.lang.String component3()+
public int component4()+
public long component5()+
public float component6()+
public java.lang.String component7()+
public AudioAnalysisMeta copy(java.lang.String analyzerVersion, + java.lang.String platform, + java.lang.String detailedStatus, + int statusCode, + long timestamp, + float analysisTime, + java.lang.String inputProcess)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioFeatures
+Constructor and Description | +
---|
AudioFeatures(float acousticness,
+ java.lang.String analysisUrl,
+ float danceability,
+ int durationMs,
+ float energy,
+ java.lang.String id,
+ float instrumentalness,
+ int key,
+ float liveness,
+ float loudness,
+ int mode,
+ float speechiness,
+ float tempo,
+ int timeSignature,
+ java.lang.String trackHref,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri,
+ float valence) |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
+ |
+
float |
+component10()
+The overall loudness of a track in decibels
+ |
+
int |
+component11()
+Mode indicates the modality
+ |
+
float |
+component12()
+Speechiness detects the presence of spoken words in a track.
+ |
+
float |
+component13()
+The overall estimated tempo of a track in beats per minute
+ |
+
int |
+component14()
+An estimated overall time signature of a track.
+ |
+
java.lang.String |
+component15()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+component16()
+The object type
+ |
+
TrackURI |
+component18()
+The Spotify URI for the track.
+ |
+
float |
+component19()
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
+ |
+
java.lang.String |
+component2()
+An HTTP URL to access the full audio analysis of this track.
+ |
+
float |
+component3()
+Danceability describes how suitable a track is for dancing based on a combination
+ |
+
int |
+component4()
+The duration of the track in milliseconds.
+ |
+
float |
+component5()
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
+ |
+
java.lang.String |
+component6()
+The Spotify ID for the track.
+ |
+
float |
+component7()
+Predicts whether a track contains no vocals.
+ |
+
int |
+component8()
+The key the track is in.
+ |
+
float |
+component9()
+Detects the presence of an audience in the recording.
+ |
+
AudioFeatures |
+copy(float acousticness,
+ java.lang.String analysisUrl,
+ float danceability,
+ int durationMs,
+ float energy,
+ java.lang.String id,
+ float instrumentalness,
+ int key,
+ float liveness,
+ float loudness,
+ int mode,
+ float speechiness,
+ float tempo,
+ int timeSignature,
+ java.lang.String trackHref,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri,
+ float valence) |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getAcousticness()
+A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
+ |
+
java.lang.String |
+getAnalysisUrl()
+An HTTP URL to access the full audio analysis of this track.
+ |
+
float |
+getDanceability()
+Danceability describes how suitable a track is for dancing based on a combination
+ |
+
int |
+getDurationMs()
+The duration of the track in milliseconds.
+ |
+
float |
+getEnergy()
+Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the track.
+ |
+
float |
+getInstrumentalness()
+Predicts whether a track contains no vocals.
+ |
+
int |
+getKey()
+The key the track is in.
+ |
+
float |
+getLiveness()
+Detects the presence of an audience in the recording.
+ |
+
float |
+getLoudness()
+The overall loudness of a track in decibels
+ |
+
int |
+getMode()
+Mode indicates the modality
+ |
+
float |
+getSpeechiness()
+Speechiness detects the presence of spoken words in a track.
+ |
+
float |
+getTempo()
+The overall estimated tempo of a track in beats per minute
+ |
+
int |
+getTimeSignature()
+An estimated overall time signature of a track.
+ |
+
java.lang.String |
+getTrackHref()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
TrackURI |
+getUri()
+The Spotify URI for the track.
+ |
+
float |
+getValence()
+A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioFeatures(float acousticness, + java.lang.String analysisUrl, + float danceability, + int durationMs, + float energy, + java.lang.String id, + float instrumentalness, + int key, + float liveness, + float loudness, + int mode, + float speechiness, + float tempo, + int timeSignature, + java.lang.String trackHref, + java.lang.String type, + java.lang.String _uri, + TrackURI uri, + float valence)+
acousticness
- A confidence measure from 0.0 to 1.0 of whether the track is acoustic.1.0 represents high confidence the track is acoustic.analysisUrl
- An HTTP URL to access the full audio analysis of this track.An access token is required to access this data.danceability
- Danceability describes how suitable a track is for dancing based on a combinationof musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of0.0 is least danceable and 1.0 is most danceable.durationMs
- The duration of the track in milliseconds.energy
- Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity andactivity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute includedynamic range, perceived loudness, timbre, onset rate, and general entropy.id
- The Spotify ID for the track.instrumentalness
- Predicts whether a track contains no vocals. “Ooh” and “aah” sounds aretreated as instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The closerthe instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.Values above 0.5 are intended to represent instrumental tracks, but confidence is higher asthe value approaches 1.0.key
- The key the track is in. Integers map to pitches using standard Pitch Class notation.E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.liveness
- Detects the presence of an audience in the recording. Higher liveness values representan increased probability that the track was performed live. A value above 0.8 provides strong likelihoodthat the track is live.loudness
- The overall loudness of a track in decibels (dB). Loudness values are averaged acrossthe entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of asound that is the primary psychological correlate of physical strength (amplitude). Values typical rangebetween -60 and 0 db.mode
- Mode indicates the modality (major or minor) of a track, the type of scale from whichits melodic content is derived. Major is represented by 1 and minor is 0.speechiness
- Speechiness detects the presence of spoken words in a track. The more exclusivelyspeech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33and 0.66 describe tracks that may contain both music and speech, either in sections or layered, includingsuch cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.tempo
- The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.timeSignature
- An estimated overall time signature of a track. The time signature (meter) is anotational convention to specify how many beats are in each bar (or measure).trackHref
- A link to the Web API endpoint providing full details of the track.type
- The object type: “audio_features”uri
- The Spotify URI for the track.valence
- A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with lowvalence sound more negative (e.g. sad, depressed, angry).public float getAcousticness()+
A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
1.0 represents high confidence the track is acoustic.
public java.lang.String getAnalysisUrl()+
An HTTP URL to access the full audio analysis of this track.
An access token is required to access this data.
public float getDanceability()+
Danceability describes how suitable a track is for dancing based on a combination
of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of0.0 is least danceable and 1.0 is most danceable.
public int getDurationMs()+
The duration of the track in milliseconds.
public float getEnergy()+
Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute includedynamic range, perceived loudness, timbre, onset rate, and general entropy.
public java.lang.String getId()+
The Spotify ID for the track.
public float getInstrumentalness()+
Predicts whether a track contains no vocals.
“Ooh” and “aah” sounds aretreated as instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The closerthe instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.Values above 0.5 are intended to represent instrumental tracks, but confidence is higher asthe value approaches 1.0.
public int getKey()+
The key the track is in.
Integers map to pitches using standard Pitch Class notation.E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
public float getLiveness()+
Detects the presence of an audience in the recording.
Higher liveness values representan increased probability that the track was performed live. A value above 0.8 provides strong likelihoodthat the track is live.
public float getLoudness()+
The overall loudness of a track in decibels
(dB). Loudness values are averaged acrossthe entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of asound that is the primary psychological correlate of physical strength (amplitude). Values typical rangebetween -60 and 0 db.
public int getMode()+
Mode indicates the modality
(major or minor) of a track, the type of scale from whichits melodic content is derived. Major is represented by 1 and minor is 0.
public float getSpeechiness()+
Speechiness detects the presence of spoken words in a track.
The more exclusivelyspeech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33and 0.66 describe tracks that may contain both music and speech, either in sections or layered, includingsuch cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.
public float getTempo()+
The overall estimated tempo of a track in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public int getTimeSignature()+
An estimated overall time signature of a track.
The time signature (meter) is anotational convention to specify how many beats are in each bar (or measure).
public java.lang.String getTrackHref()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String getType()+
The object type
: “audio_features”
public TrackURI getUri()+
The Spotify URI for the track.
public float getValence()+
A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with lowvalence sound more negative (e.g. sad, depressed, angry).
public float component1()+
A confidence measure from 0.0 to 1.0 of whether the track is acoustic.
1.0 represents high confidence the track is acoustic.
public java.lang.String component2()+
An HTTP URL to access the full audio analysis of this track.
An access token is required to access this data.
public float component3()+
Danceability describes how suitable a track is for dancing based on a combination
of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of0.0 is least danceable and 1.0 is most danceable.
public int component4()+
The duration of the track in milliseconds.
public float component5()+
Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and
activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy,while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute includedynamic range, perceived loudness, timbre, onset rate, and general entropy.
public java.lang.String component6()+
The Spotify ID for the track.
public float component7()+
Predicts whether a track contains no vocals.
“Ooh” and “aah” sounds aretreated as instrumental in this context. Rap or spoken word tracks are clearly “vocal”. The closerthe instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.Values above 0.5 are intended to represent instrumental tracks, but confidence is higher asthe value approaches 1.0.
public int component8()+
The key the track is in.
Integers map to pitches using standard Pitch Class notation.E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on.
public float component9()+
Detects the presence of an audience in the recording.
Higher liveness values representan increased probability that the track was performed live. A value above 0.8 provides strong likelihoodthat the track is live.
public float component10()+
The overall loudness of a track in decibels
(dB). Loudness values are averaged acrossthe entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of asound that is the primary psychological correlate of physical strength (amplitude). Values typical rangebetween -60 and 0 db.
public int component11()+
Mode indicates the modality
(major or minor) of a track, the type of scale from whichits melodic content is derived. Major is represented by 1 and minor is 0.
public float component12()+
Speechiness detects the presence of spoken words in a track.
The more exclusivelyspeech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33and 0.66 describe tracks that may contain both music and speech, either in sections or layered, includingsuch cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.
public float component13()+
The overall estimated tempo of a track in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public int component14()+
An estimated overall time signature of a track.
The time signature (meter) is anotational convention to specify how many beats are in each bar (or measure).
public java.lang.String component15()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String component16()+
The object type
: “audio_features”
public TrackURI component18()+
The Spotify URI for the track.
public float component19()+
A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with lowvalence sound more negative (e.g. sad, depressed, angry).
public AudioFeatures copy(float acousticness, + java.lang.String analysisUrl, + float danceability, + int durationMs, + float energy, + java.lang.String id, + float instrumentalness, + int key, + float liveness, + float loudness, + int mode, + float speechiness, + float tempo, + int timeSignature, + java.lang.String trackHref, + java.lang.String type, + java.lang.String _uri, + TrackURI uri, + float valence)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioSection
+Constructor and Description | +
---|
AudioSection(float start,
+ float duration,
+ float confidence,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ int timeSignature,
+ float timeSignatureConfidence) |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+The starting point
+ |
+
float |
+component10()
+The confidence,
+ |
+
int |
+component11()
+An estimated overall time signature of a track.
+ |
+
float |
+component12()
+The confidence,
+ |
+
float |
+component2()
+The duration
+ |
+
float |
+component3()
+The confidence,
+ |
+
float |
+component4()
+The overall loudness of the section in decibels
+ |
+
float |
+component5()
+The overall estimated tempo of the section in beats per minute
+ |
+
float |
+component6()
+The confidence,
+ |
+
int |
+component7()
+The estimated overall key of the section.
+ |
+
float |
+component8()
+The confidence,
+ |
+
int |
+component9()
+Indicates the modality
+ |
+
AudioSection |
+copy(float start,
+ float duration,
+ float confidence,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ int timeSignature,
+ float timeSignatureConfidence) |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getConfidence()
+The confidence,
+ |
+
float |
+getDuration()
+The duration
+ |
+
int |
+getKey()
+The estimated overall key of the section.
+ |
+
float |
+getKeyConfidence()
+The confidence,
+ |
+
float |
+getLoudness()
+The overall loudness of the section in decibels
+ |
+
int |
+getMode()
+Indicates the modality
+ |
+
float |
+getModeConfidence()
+The confidence,
+ |
+
float |
+getStart()
+The starting point
+ |
+
float |
+getTempo()
+The overall estimated tempo of the section in beats per minute
+ |
+
float |
+getTempoConfidence()
+The confidence,
+ |
+
int |
+getTimeSignature()
+An estimated overall time signature of a track.
+ |
+
float |
+getTimeSignatureConfidence()
+The confidence,
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioSection(float start, + float duration, + float confidence, + float loudness, + float tempo, + float tempoConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + int timeSignature, + float timeSignatureConfidence)+
start
- The starting point (in seconds) of the section.duration
- The duration (in seconds) of the section.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the section’s “designation”.loudness
- The overall loudness of the section in decibels (dB). Loudness values are usefulfor comparing relative loudness of sections within tracks.tempo
- The overall estimated tempo of the section in beats per minute (BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.tempoConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempochanges or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.key
- The estimated overall key of the section. The values in this field ranging from 0 to 11 mapping topitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,the value is -1.keyConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the key.Songs with many key changes may correspond to low values in this field.mode
- Indicates the modality (major or minor) of a track, the type of scale from which its melodic content isderived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as bothkeys carry the same pitches.modeConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the mode.timeSignature
- An estimated overall time signature of a track. The time signature (meter) is a notationalconvention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7indicating time signatures of “3/4”, to “7/4”.timeSignatureConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the time_signature.Sections with time signature changes may correspond to low values in this field.start
- The starting point (in seconds) of the section.duration
- The duration (in seconds) of the section.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the section’s “designation”.loudness
- The overall loudness of the section in decibels (dB). Loudness values are useful
+for comparing relative loudness of sections within tracks.tempo
- The overall estimated tempo of the section in beats per minute (BPM). In musical terminology, tempo
+is the speed or pace of a given piece and derives directly from the average beat duration.tempoConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempo
+changes or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.key
- The estimated overall key of the section. The values in this field ranging from 0 to 11 mapping to
+pitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,
+the value is -1.keyConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the key.
+Songs with many key changes may correspond to low values in this field.mode
- Indicates the modality (major or minor) of a track, the type of scale from which its melodic content is
+derived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key
+(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as both
+keys carry the same pitches.modeConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the mode.timeSignature
- An estimated overall time signature of a track. The time signature (meter) is a notational
+convention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7
+indicating time signatures of “3/4”, to “7/4”.timeSignatureConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the time_signature.
+Sections with time signature changes may correspond to low values in this field.public float getStart()+
The starting point
(in seconds) of the section.
public float getDuration()+
The duration
(in seconds) of the section.
public float getConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the section’s “designation”.
public float getLoudness()+
The overall loudness of the section in decibels
(dB). Loudness values are usefulfor comparing relative loudness of sections within tracks.
public float getTempo()+
The overall estimated tempo of the section in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public float getTempoConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempochanges or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.
public int getKey()+
The estimated overall key of the section.
The values in this field ranging from 0 to 11 mapping topitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,the value is -1.
public float getKeyConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the key.Songs with many key changes may correspond to low values in this field.
public int getMode()+
Indicates the modality
(major or minor) of a track, the type of scale from which its melodic content isderived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as bothkeys carry the same pitches.
public float getModeConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the mode.
public int getTimeSignature()+
An estimated overall time signature of a track.
The time signature (meter) is a notationalconvention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7indicating time signatures of “3/4”, to “7/4”.
public float getTimeSignatureConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the time_signature.Sections with time signature changes may correspond to low values in this field.
public float component1()+
The starting point
(in seconds) of the section.
public float component2()+
The duration
(in seconds) of the section.
public float component3()+
The confidence,
from 0.0 to 1.0, of the reliability of the section’s “designation”.
public float component4()+
The overall loudness of the section in decibels
(dB). Loudness values are usefulfor comparing relative loudness of sections within tracks.
public float component5()+
The overall estimated tempo of the section in beats per minute
(BPM). In musical terminology, tempois the speed or pace of a given piece and derives directly from the average beat duration.
public float component6()+
The confidence,
from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempochanges or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.
public int component7()+
The estimated overall key of the section.
The values in this field ranging from 0 to 11 mapping topitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,the value is -1.
public float component8()+
The confidence,
from 0.0 to 1.0, of the reliability of the key.Songs with many key changes may correspond to low values in this field.
public int component9()+
Indicates the modality
(major or minor) of a track, the type of scale from which its melodic content isderived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as bothkeys carry the same pitches.
public float component10()+
The confidence,
from 0.0 to 1.0, of the reliability of the mode.
public int component11()+
An estimated overall time signature of a track.
The time signature (meter) is a notationalconvention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7indicating time signatures of “3/4”, to “7/4”.
public float component12()+
The confidence,
from 0.0 to 1.0, of the reliability of the time_signature.Sections with time signature changes may correspond to low values in this field.
public AudioSection copy(float start, + float duration, + float confidence, + float loudness, + float tempo, + float tempoConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + int timeSignature, + float timeSignatureConfidence)+
start
- The starting point (in seconds) of the section.duration
- The duration (in seconds) of the section.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the section’s “designation”.loudness
- The overall loudness of the section in decibels (dB). Loudness values are useful
+for comparing relative loudness of sections within tracks.tempo
- The overall estimated tempo of the section in beats per minute (BPM). In musical terminology, tempo
+is the speed or pace of a given piece and derives directly from the average beat duration.tempoConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempo
+changes or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.key
- The estimated overall key of the section. The values in this field ranging from 0 to 11 mapping to
+pitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected,
+the value is -1.keyConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the key.
+Songs with many key changes may correspond to low values in this field.mode
- Indicates the modality (major or minor) of a track, the type of scale from which its melodic content is
+derived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key
+(e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as both
+keys carry the same pitches.modeConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the mode.timeSignature
- An estimated overall time signature of a track. The time signature (meter) is a notational
+convention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7
+indicating time signatures of “3/4”, to “7/4”.timeSignatureConfidence
- The confidence, from 0.0 to 1.0, of the reliability of the time_signature.
+Sections with time signature changes may correspond to low values in this field.public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class AudioSegment
+Constructor and Description | +
---|
AudioSegment(float start,
+ float duration,
+ float confidence,
+ float loudnessStart,
+ float loudnessMaxTime,
+ float loudnessMax,
+ java.lang.Float loudnessEnd,
+ java.util.List<java.lang.Float> pitches,
+ java.util.List<java.lang.Float> timbre) |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+The starting point
+ |
+
float |
+component2()
+The duration
+ |
+
float |
+component3()
+The confidence,
+ |
+
float |
+component4()
+The onset loudness of the segment in decibels
+ |
+
float |
+component5()
+The segment-relative offset of the segment peak loudness in seconds.
+ |
+
float |
+component6()
+The peak loudness of the segment in decibels
+ |
+
java.lang.Float |
+component7()
+The offset loudness of the segment in decibels
+ |
+
java.util.List<java.lang.Float> |
+component8()
+A
+ |
+
java.util.List<java.lang.Float> |
+component9()
+Timbre is the quality of a musical note or sound that distinguishes different types of musical
+ |
+
AudioSegment |
+copy(float start,
+ float duration,
+ float confidence,
+ float loudnessStart,
+ float loudnessMaxTime,
+ float loudnessMax,
+ java.lang.Float loudnessEnd,
+ java.util.List<java.lang.Float> pitches,
+ java.util.List<java.lang.Float> timbre) |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getConfidence()
+The confidence,
+ |
+
float |
+getDuration()
+The duration
+ |
+
java.lang.Float |
+getLoudnessEnd()
+The offset loudness of the segment in decibels
+ |
+
float |
+getLoudnessMax()
+The peak loudness of the segment in decibels
+ |
+
float |
+getLoudnessMaxTime()
+The segment-relative offset of the segment peak loudness in seconds.
+ |
+
float |
+getLoudnessStart()
+The onset loudness of the segment in decibels
+ |
+
java.util.List<java.lang.Float> |
+getPitches()
+A
+ |
+
float |
+getStart()
+The starting point
+ |
+
java.util.List<java.lang.Float> |
+getTimbre()
+Timbre is the quality of a musical note or sound that distinguishes different types of musical
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public AudioSegment(float start, + float duration, + float confidence, + float loudnessStart, + float loudnessMaxTime, + float loudnessMax, + java.lang.Float loudnessEnd, + java.util.List<java.lang.Float> pitches, + java.util.List<java.lang.Float> timbre)+
start
- The starting point (in seconds) of the segment.duration
- The duration (in seconds) of the segment.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song whichare difficult to logically segment (e.g: noise) may correspond to low values in this field.loudnessStart
- The onset loudness of the segment in decibels (dB). Combined with loudness_max andloudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessMaxTime
- The segment-relative offset of the segment peak loudness in seconds. Combined withloudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.loudnessMax
- The peak loudness of the segment in decibels (dB). Combined with loudness_start andloudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessEnd
- The offset loudness of the segment in decibels (dB). This value should be equivalent to theloudness_start of the following segment.pitches
- A “chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classesC, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scaletimbre
- Timbre is the quality of a musical note or sound that distinguishes different types of musicalinstruments, or voices. Timbre vectors are best used in comparison with each other.start
- The starting point (in seconds) of the segment.duration
- The duration (in seconds) of the segment.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song which
+are difficult to logically segment (e.g: noise) may correspond to low values in this field.loudnessStart
- The onset loudness of the segment in decibels (dB). Combined with loudness_max and
+loudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessMaxTime
- The segment-relative offset of the segment peak loudness in seconds. Combined with
+loudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.loudnessMax
- The peak loudness of the segment in decibels (dB). Combined with loudness_start and
+loudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessEnd
- The offset loudness of the segment in decibels (dB). This value should be equivalent to the
+loudness_start of the following segment.pitches
- A “chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classes
+C, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scaletimbre
- Timbre is the quality of a musical note or sound that distinguishes different types of musical
+instruments, or voices. Timbre vectors are best used in comparison with each other.public float getStart()+
The starting point
(in seconds) of the segment.
public float getDuration()+
The duration
(in seconds) of the segment.
public float getConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song whichare difficult to logically segment (e.g: noise) may correspond to low values in this field.
public float getLoudnessStart()+
The onset loudness of the segment in decibels
(dB). Combined with loudness_max andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public float getLoudnessMaxTime()+
The segment-relative offset of the segment peak loudness in seconds.
Combined withloudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.
public float getLoudnessMax()+
The peak loudness of the segment in decibels
(dB). Combined with loudness_start andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public java.lang.Float getLoudnessEnd()+
The offset loudness of the segment in decibels
(dB). This value should be equivalent to theloudness_start of the following segment.
public java.util.List<java.lang.Float> getPitches()+
A
“chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classesC, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale
public java.util.List<java.lang.Float> getTimbre()+
Timbre is the quality of a musical note or sound that distinguishes different types of musical
instruments, or voices. Timbre vectors are best used in comparison with each other.
public float component1()+
The starting point
(in seconds) of the segment.
public float component2()+
The duration
(in seconds) of the segment.
public float component3()+
The confidence,
from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song whichare difficult to logically segment (e.g: noise) may correspond to low values in this field.
public float component4()+
The onset loudness of the segment in decibels
(dB). Combined with loudness_max andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public float component5()+
The segment-relative offset of the segment peak loudness in seconds.
Combined withloudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.
public float component6()+
The peak loudness of the segment in decibels
(dB). Combined with loudness_start andloudness_max_time, these components can be used to desctibe the “attack” of the segment.
public java.lang.Float component7()+
The offset loudness of the segment in decibels
(dB). This value should be equivalent to theloudness_start of the following segment.
public java.util.List<java.lang.Float> component8()+
A
“chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classesC, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale
public java.util.List<java.lang.Float> component9()+
Timbre is the quality of a musical note or sound that distinguishes different types of musical
instruments, or voices. Timbre vectors are best used in comparison with each other.
public AudioSegment copy(float start, + float duration, + float confidence, + float loudnessStart, + float loudnessMaxTime, + float loudnessMax, + java.lang.Float loudnessEnd, + java.util.List<java.lang.Float> pitches, + java.util.List<java.lang.Float> timbre)+
start
- The starting point (in seconds) of the segment.duration
- The duration (in seconds) of the segment.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song which
+are difficult to logically segment (e.g: noise) may correspond to low values in this field.loudnessStart
- The onset loudness of the segment in decibels (dB). Combined with loudness_max and
+loudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessMaxTime
- The segment-relative offset of the segment peak loudness in seconds. Combined with
+loudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.loudnessMax
- The peak loudness of the segment in decibels (dB). Combined with loudness_start and
+loudness_max_time, these components can be used to desctibe the “attack” of the segment.loudnessEnd
- The offset loudness of the segment in decibels (dB). This value should be equivalent to the
+loudness_start of the following segment.pitches
- A “chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classes
+C, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scaletimbre
- Timbre is the quality of a musical note or sound that distinguishes different types of musical
+instruments, or voices. Timbre vectors are best used in comparison with each other.public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class BadRequestException
+Constructor and Description | +
---|
BadRequestException(java.lang.String message) |
+
BadRequestException(ErrorObject error) |
+
public BadRequestException(java.lang.String message)+
public BadRequestException(ErrorObject error)+
public class Context
+Constructor and Description | +
---|
Context(java.util.HashMap<java.lang.String,java.lang.String> externalUrls) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.HashMap<java.lang.String,java.lang.String> |
+component1() |
+
Context |
+copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Context(java.util.HashMap<java.lang.String,java.lang.String> externalUrls)+
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
public java.util.HashMap<java.lang.String,java.lang.String> component1()+
public Context copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class CurrentlyPlayingContext
+Constructor and Description | +
---|
CurrentlyPlayingContext(java.lang.Long timestamp,
+ Device device,
+ java.lang.String progressMs,
+ boolean isPlaying,
+ Track item,
+ boolean shuffleState,
+ java.lang.String repeatState,
+ Context context) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Long |
+component1() |
+
Device |
+component2() |
+
java.lang.String |
+component3() |
+
boolean |
+component4() |
+
Track |
+component5() |
+
boolean |
+component6() |
+
java.lang.String |
+component7() |
+
Context |
+component8() |
+
CurrentlyPlayingContext |
+copy(java.lang.Long timestamp,
+ Device device,
+ java.lang.String progressMs,
+ boolean isPlaying,
+ Track item,
+ boolean shuffleState,
+ java.lang.String repeatState,
+ Context context) |
+
boolean |
+equals(java.lang.Object p) |
+
Context |
+getContext() |
+
Device |
+getDevice() |
+
Track |
+getItem() |
+
java.lang.String |
+getProgressMs() |
+
java.lang.String |
+getRepeatState() |
+
boolean |
+getShuffleState() |
+
java.lang.Long |
+getTimestamp() |
+
int |
+hashCode() |
+
boolean |
+isPlaying() |
+
java.lang.String |
+toString() |
+
public java.lang.Long getTimestamp()+
public Device getDevice()+
public java.lang.String getProgressMs()+
public boolean isPlaying()+
public Track getItem()+
public boolean getShuffleState()+
public java.lang.String getRepeatState()+
public Context getContext()+
public java.lang.Long component1()+
public Device component2()+
public java.lang.String component3()+
public boolean component4()+
public Track component5()+
public boolean component6()+
public java.lang.String component7()+
public Context component8()+
public CurrentlyPlayingContext copy(java.lang.Long timestamp, + Device device, + java.lang.String progressMs, + boolean isPlaying, + Track item, + boolean shuffleState, + java.lang.String repeatState, + Context context)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class CurrentlyPlayingObject
+Constructor and Description | +
---|
CurrentlyPlayingObject(PlayHistoryContext context,
+ long timestamp,
+ int progressMs,
+ boolean isPlaying,
+ Track item) |
+
Modifier and Type | +Method and Description | +
---|---|
PlayHistoryContext |
+component1() |
+
long |
+component2() |
+
int |
+component3() |
+
boolean |
+component4() |
+
Track |
+component5() |
+
CurrentlyPlayingObject |
+copy(PlayHistoryContext context,
+ long timestamp,
+ int progressMs,
+ boolean isPlaying,
+ Track item) |
+
boolean |
+equals(java.lang.Object p) |
+
PlayHistoryContext |
+getContext() |
+
Track |
+getItem() |
+
int |
+getProgressMs() |
+
long |
+getTimestamp() |
+
int |
+hashCode() |
+
boolean |
+isPlaying() |
+
java.lang.String |
+toString() |
+
public CurrentlyPlayingObject(PlayHistoryContext context, + long timestamp, + int progressMs, + boolean isPlaying, + Track item)+
public PlayHistoryContext getContext()+
public long getTimestamp()+
public int getProgressMs()+
public boolean isPlaying()+
public Track getItem()+
public PlayHistoryContext component1()+
public long component2()+
public int component3()+
public boolean component4()+
public Track component5()+
public CurrentlyPlayingObject copy(PlayHistoryContext context, + long timestamp, + int progressMs, + boolean isPlaying, + Track item)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Cursor
+The cursor to use as key to find the next (or previous) page of items.
Constructor and Description | +
---|
Cursor(java.lang.String before,
+ java.lang.String after)
+The cursor to use as key to find the next (or previous) page of items.
+ |
+
Cursor()
+The cursor to use as key to find the next (or previous) page of items.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
Cursor |
+copy(java.lang.String before,
+ java.lang.String after)
+The cursor to use as key to find the next (or previous) page of items.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAfter() |
+
java.lang.String |
+getBefore() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Cursor(java.lang.String before, + java.lang.String after)+
The cursor to use as key to find the next (or previous) page of items.
public Cursor()+
The cursor to use as key to find the next (or previous) page of items.
public java.lang.String getBefore()+
public java.lang.String getAfter()+
public java.lang.String component1()+
public java.lang.String component2()+
public Cursor copy(java.lang.String before, + java.lang.String after)+
The cursor to use as key to find the next (or previous) page of items.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class CursorBasedPagingObject<T>
+extends AbstractPagingObject
+The cursor-based paging object is a container for a set of objects. It contains a key called +items (whose value is an array of the requested objects) along with other keys like next and +cursors that can be useful in future calls.
itemClazz
Constructor and Description | +
---|
CursorBasedPagingObject(java.lang.String href,
+ java.util.List<? extends T> items,
+ int limit,
+ java.lang.String next,
+ Cursor cursor,
+ int total)
+The cursor-based paging object is a container for a set of objects. It contains a key called
+items (whose value is an array of the requested objects) along with other keys like next and
+cursors that can be useful in future calls.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<kotlin.sequences.Sequence> |
+getAll()
+Get all CursorBasedPagingObjects associated with the request
+ |
+
kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> |
+getAllImpl$module() |
+
SpotifyRestAction<java.util.List> |
+getAllItems()
+Get all items of type T associated with the request
+ |
+
Cursor |
+getCursor()
+The cursors used to find the next set of items..
+ |
+
AbstractPagingObject<T> |
+getImpl$module(PagingTraversalType type) |
+
SpotifyRestAction<com.adamratzman.spotify.models.CursorBasedPagingObject> |
+getNext()
+Get the next set of T items
+ |
+
getHref, getItemClazz, getItems, getLimit, getNext, getOffset, getPrevious, getTotal, setItemClazz
public CursorBasedPagingObject(java.lang.String href, + java.util.List<? extends T> items, + int limit, + java.lang.String next, + Cursor cursor, + int total)+
The cursor-based paging object is a container for a set of objects. It contains a key called +items (whose value is an array of the requested objects) along with other keys like next and +cursors that can be useful in future calls.
cursor
- The cursors used to find the next set of items..public SpotifyRestAction<com.adamratzman.spotify.models.CursorBasedPagingObject> getNext()+
Get the next set of T items
public SpotifyRestAction<kotlin.sequences.Sequence> getAll()+
Get all CursorBasedPagingObjects associated with the request
public SpotifyRestAction<java.util.List> getAllItems()+
Get all items of type T associated with the request
public AbstractPagingObject<T> getImpl$module(PagingTraversalType type)+
public kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> getAllImpl$module()+
public Cursor getCursor()+
The cursors used to find the next set of items..
public class Device
+Constructor and Description | +
---|
Device(java.lang.String id,
+ boolean isActive,
+ boolean isRestricted,
+ java.lang.String name,
+ java.lang.String type,
+ int volumePercent) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
boolean |
+component2() |
+
boolean |
+component3() |
+
java.lang.String |
+component4() |
+
java.lang.String |
+component5() |
+
int |
+component6() |
+
Device |
+copy(java.lang.String id,
+ boolean isActive,
+ boolean isRestricted,
+ java.lang.String name,
+ java.lang.String type,
+ int volumePercent) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getId() |
+
java.lang.String |
+getName() |
+
java.lang.String |
+getType() |
+
int |
+getVolumePercent() |
+
int |
+hashCode() |
+
boolean |
+isActive() |
+
boolean |
+isRestricted() |
+
java.lang.String |
+toString() |
+
public Device(java.lang.String id, + boolean isActive, + boolean isRestricted, + java.lang.String name, + java.lang.String type, + int volumePercent)+
public java.lang.String getId()+
public boolean isActive()+
public boolean isRestricted()+
public java.lang.String getName()+
public java.lang.String getType()+
public int getVolumePercent()+
public java.lang.String component1()+
public boolean component2()+
public boolean component3()+
public java.lang.String component4()+
public java.lang.String component5()+
public int component6()+
public Device copy(java.lang.String id, + boolean isActive, + boolean isRestricted, + java.lang.String name, + java.lang.String type, + int volumePercent)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ErrorObject
+Contains a parsed error from Spotify
Constructor and Description | +
---|
ErrorObject(int status,
+ java.lang.String message)
+Contains a parsed error from Spotify
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component1()
+The HTTP status code
+ |
+
java.lang.String |
+component2()
+A short description of the cause of the error.
+ |
+
ErrorObject |
+copy(int status,
+ java.lang.String message)
+Contains a parsed error from Spotify
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getMessage()
+A short description of the cause of the error.
+ |
+
int |
+getStatus()
+The HTTP status code
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public ErrorObject(int status, + java.lang.String message)+
Contains a parsed error from Spotify
status
- The HTTP status codemessage
- A short description of the cause of the error.public int getStatus()+
The HTTP status code
public java.lang.String getMessage()+
A short description of the cause of the error.
public int component1()+
The HTTP status code
public java.lang.String component2()+
A short description of the cause of the error.
public ErrorObject copy(int status, + java.lang.String message)+
Contains a parsed error from Spotify
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class ErrorResponse
+Wrapper around class ErrorObject
class ErrorObject
Constructor and Description | +
---|
ErrorResponse(ErrorObject error)
+Wrapper around
+class ErrorObject |
+
Modifier and Type | +Method and Description | +
---|---|
ErrorObject |
+component1() |
+
ErrorResponse |
+copy(ErrorObject error)
+Wrapper around
+class ErrorObject |
+
boolean |
+equals(java.lang.Object p) |
+
ErrorObject |
+getError() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public ErrorResponse(ErrorObject error)+
Wrapper around class ErrorObject
class ErrorObject
public ErrorObject getError()+
public ErrorObject component1()+
public ErrorResponse copy(ErrorObject error)+
Wrapper around class ErrorObject
class ErrorObject
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class FeaturedPlaylists
+Spotify featured playlists (on the Browse tab)
Constructor and Description | +
---|
FeaturedPlaylists(java.lang.String message,
+ PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)
+Spotify featured playlists (on the Browse tab)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+the featured message in
+ |
+
PagingObject<com.adamratzman.spotify.models.SimplePlaylist> |
+component2()
+
+ |
+
FeaturedPlaylists |
+copy(java.lang.String message,
+ PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)
+Spotify featured playlists (on the Browse tab)
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getMessage()
+the featured message in
+ |
+
PagingObject<com.adamratzman.spotify.models.SimplePlaylist> |
+getPlaylists()
+
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public FeaturedPlaylists(java.lang.String message, + PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)+
Spotify featured playlists (on the Browse tab)
message
- the featured message in "Overview"playlists
- class PagingObject
of returned itemspublic java.lang.String getMessage()+
the featured message in
"Overview"
public PagingObject<com.adamratzman.spotify.models.SimplePlaylist> getPlaylists()+
of returned items
class PagingObject
public java.lang.String component1()+
the featured message in
"Overview"
public PagingObject<com.adamratzman.spotify.models.SimplePlaylist> component2()+
of returned items
class PagingObject
public FeaturedPlaylists copy(java.lang.String message, + PagingObject<com.adamratzman.spotify.models.SimplePlaylist> playlists)+
Spotify featured playlists (on the Browse tab)
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Followers
+Spotify user's followers
Constructor and Description | +
---|
Followers(java.lang.String href,
+ int total)
+Spotify user's followers
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+Will always be null,
+ |
+
int |
+component2()
+-1 if the user object does not contain followers,
+ |
+
Followers |
+copy(java.lang.String href,
+ int total)
+Spotify user's followers
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getHref()
+Will always be null,
+ |
+
int |
+getTotal()
+-1 if the user object does not contain followers,
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Followers(java.lang.String href, + int total)+
Spotify user's followers
href
- Will always be null, per the Spotify documentation,until the Web API is updated to support this.total
- -1 if the user object does not contain followers, otherwise the amount of followers the user haspublic java.lang.String getHref()+
Will always be null,
per the Spotify documentation,until the Web API is updated to support this.
public int getTotal()+
-1 if the user object does not contain followers,
otherwise the amount of followers the user has
public java.lang.String component1()+
Will always be null,
per the Spotify documentation,until the Web API is updated to support this.
public int component2()+
-1 if the user object does not contain followers,
otherwise the amount of followers the user has
public Followers copy(java.lang.String href, + int total)+
Spotify user's followers
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class HelpersKt
+public class KlaxonConvertersKt
+public class Linkable
+Allow for track relinking
Modifier and Type | +Field and Description | +
---|---|
SpotifyAPI |
+api |
+
Constructor and Description | +
---|
Linkable()
+Allow for track relinking
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyAPI |
+getApi() |
+
void |
+setApi(SpotifyAPI p) |
+
public SpotifyAPI api+
public SpotifyAPI getApi()+
public void setApi(SpotifyAPI p)+
public class LinkedTrack
+Represents a relinked track. This is playable in the +searched market. If null, the API result is playable in the market.
Constructor and Description | +
---|
LinkedTrack(java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri)
+Represents a relinked track. This is playable in the
+searched market. If null, the API result is playable in the market.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.HashMap<java.lang.String,java.lang.String> |
+component1() |
+
java.lang.String |
+component2() |
+
java.lang.String |
+component3() |
+
java.lang.String |
+component4() |
+
TrackURI |
+component6() |
+
LinkedTrack |
+copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri)
+Represents a relinked track. This is playable in the
+searched market. If null, the API result is playable in the market.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls() |
+
java.lang.String |
+getHref() |
+
java.lang.String |
+getId() |
+
java.lang.String |
+getType() |
+
TrackURI |
+getUri() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public LinkedTrack(java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.lang.String type, + java.lang.String _uri, + TrackURI uri)+
Represents a relinked track. This is playable in the +searched market. If null, the API result is playable in the market.
externalUrls
- href
- id
- type
- uri
- public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
public java.lang.String getHref()+
public java.lang.String getId()+
public java.lang.String getType()+
public TrackURI getUri()+
public java.util.HashMap<java.lang.String,java.lang.String> component1()+
public java.lang.String component2()+
public java.lang.String component3()+
public java.lang.String component4()+
public TrackURI component6()+
public LinkedTrack copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.lang.String type, + java.lang.String _uri, + TrackURI uri)+
Represents a relinked track. This is playable in the +searched market. If null, the API result is playable in the market.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public enum Market
+Represents Spotify markets (countries + distinctive territories)
Enum Constant and Description | +
---|
AD |
+
AE |
+
AF |
+
AG |
+
AL |
+
AM |
+
AO |
+
AR |
+
AT |
+
AU |
+
AW |
+
AZ |
+
BA |
+
BB |
+
BD |
+
BE |
+
BF |
+
BG |
+
BH |
+
BI |
+
BJ |
+
BM |
+
BN |
+
BO |
+
BR |
+
BS |
+
BT |
+
BW |
+
BY |
+
BZ |
+
CA |
+
CD |
+
CF |
+
CG |
+
CH |
+
CI |
+
CL |
+
CM |
+
CN |
+
CO |
+
CR |
+
CV |
+
CY |
+
CZ |
+
DE |
+
DJ |
+
DK |
+
DM |
+
DO |
+
DZ |
+
EC |
+
EE |
+
EG |
+
ER |
+
ES |
+
ET |
+
FI |
+
FJ |
+
FK |
+
FM |
+
FR |
+
GA |
+
GB |
+
GD |
+
GE |
+
GF |
+
GH |
+
GL |
+
GM |
+
GN |
+
GP |
+
GQ |
+
GR |
+
GS |
+
GT |
+
GW |
+
GY |
+
HK |
+
HN |
+
HR |
+
HT |
+
HU |
+
ID |
+
IE |
+
IL |
+
IN |
+
IQ |
+
IR |
+
IS |
+
IT |
+
JM |
+
JO |
+
JP |
+
KE |
+
KG |
+
KH |
+
KI |
+
KM |
+
KN |
+
KR |
+
KW |
+
KZ |
+
LA |
+
LB |
+
LC |
+
LI |
+
LK |
+
LR |
+
LS |
+
LT |
+
LU |
+
LV |
+
LY |
+
MA |
+
MC |
+
MD |
+
ME |
+
MG |
+
MH |
+
MK |
+
ML |
+
MM |
+
MN |
+
MO |
+
MP |
+
MR |
+
MT |
+
MU |
+
MV |
+
MW |
+
MX |
+
MY |
+
MZ |
+
NA |
+
NE |
+
NG |
+
NI |
+
NL |
+
NO |
+
NP |
+
NR |
+
NZ |
+
OM |
+
PA |
+
PE |
+
PG |
+
PH |
+
PK |
+
PL |
+
PR |
+
PT |
+
PW |
+
PY |
+
QA |
+
RO |
+
RS |
+
RU |
+
RW |
+
SA |
+
SB |
+
SC |
+
SD |
+
SE |
+
SG |
+
SI |
+
SK |
+
SL |
+
SM |
+
SN |
+
SO |
+
SR |
+
SS |
+
ST |
+
SV |
+
SY |
+
SZ |
+
TD |
+
TG |
+
TH |
+
TJ |
+
TL |
+
TM |
+
TN |
+
TO |
+
TR |
+
TT |
+
TV |
+
TW |
+
TZ |
+
UA |
+
UG |
+
US |
+
UY |
+
UZ |
+
VA |
+
VC |
+
VE |
+
VN |
+
VU |
+
WS |
+
YE |
+
ZA |
+
ZM |
+
ZW |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getCode() |
+
java.lang.String |
+getCountry()
+the readable country name of the market
+ |
+
public static Market AD+
public static Market AE+
public static Market AF+
public static Market AG+
public static Market AL+
public static Market AM+
public static Market AO+
public static Market AR+
public static Market AT+
public static Market AU+
public static Market AW+
public static Market AZ+
public static Market BA+
public static Market BB+
public static Market BD+
public static Market BE+
public static Market BF+
public static Market BG+
public static Market BH+
public static Market BI+
public static Market BJ+
public static Market BM+
public static Market BN+
public static Market BO+
public static Market BR+
public static Market BS+
public static Market BT+
public static Market BW+
public static Market BY+
public static Market BZ+
public static Market CA+
public static Market CD+
public static Market CF+
public static Market CG+
public static Market CH+
public static Market CI+
public static Market CL+
public static Market CM+
public static Market CN+
public static Market CO+
public static Market CR+
public static Market CV+
public static Market CY+
public static Market CZ+
public static Market DE+
public static Market DJ+
public static Market DK+
public static Market DM+
public static Market DO+
public static Market DZ+
public static Market EC+
public static Market EE+
public static Market EG+
public static Market ER+
public static Market ES+
public static Market ET+
public static Market FI+
public static Market FJ+
public static Market FK+
public static Market FM+
public static Market FR+
public static Market GA+
public static Market GB+
public static Market GD+
public static Market GE+
public static Market GF+
public static Market GH+
public static Market GL+
public static Market GM+
public static Market GN+
public static Market GP+
public static Market GQ+
public static Market GR+
public static Market GS+
public static Market GT+
public static Market GW+
public static Market GY+
public static Market HK+
public static Market HN+
public static Market HR+
public static Market HT+
public static Market HU+
public static Market ID+
public static Market IE+
public static Market IL+
public static Market IN+
public static Market IQ+
public static Market IR+
public static Market IS+
public static Market IT+
public static Market JM+
public static Market JO+
public static Market JP+
public static Market KE+
public static Market KG+
public static Market KH+
public static Market KI+
public static Market KM+
public static Market KN+
public static Market KR+
public static Market KW+
public static Market KZ+
public static Market LA+
public static Market LB+
public static Market LC+
public static Market LI+
public static Market LK+
public static Market LR+
public static Market LS+
public static Market LT+
public static Market LU+
public static Market LV+
public static Market LY+
public static Market MA+
public static Market MC+
public static Market MD+
public static Market ME+
public static Market MG+
public static Market MH+
public static Market MK+
public static Market ML+
public static Market MM+
public static Market MN+
public static Market MO+
public static Market MP+
public static Market MR+
public static Market MT+
public static Market MU+
public static Market MV+
public static Market MW+
public static Market MX+
public static Market MY+
public static Market MZ+
public static Market NA+
public static Market NE+
public static Market NG+
public static Market NI+
public static Market NL+
public static Market NO+
public static Market NP+
public static Market NR+
public static Market NZ+
public static Market OM+
public static Market PA+
public static Market PE+
public static Market PG+
public static Market PH+
public static Market PK+
public static Market PL+
public static Market PR+
public static Market PT+
public static Market PW+
public static Market PY+
public static Market QA+
public static Market RO+
public static Market RS+
public static Market RU+
public static Market RW+
public static Market SA+
public static Market SB+
public static Market SC+
public static Market SD+
public static Market SE+
public static Market SG+
public static Market SI+
public static Market SK+
public static Market SL+
public static Market SM+
public static Market SN+
public static Market SO+
public static Market SR+
public static Market SS+
public static Market ST+
public static Market SV+
public static Market SY+
public static Market SZ+
public static Market TD+
public static Market TG+
public static Market TH+
public static Market TJ+
public static Market TL+
public static Market TM+
public static Market TN+
public static Market TO+
public static Market TR+
public static Market TT+
public static Market TV+
public static Market TW+
public static Market TZ+
public static Market UA+
public static Market UG+
public static Market US+
public static Market UY+
public static Market UZ+
public static Market VA+
public static Market VC+
public static Market VE+
public static Market VN+
public static Market VU+
public static Market WS+
public static Market YE+
public static Market ZA+
public static Market ZM+
public static Market ZW+
public class MiscUtilsKt
+Modifier and Type | +Method and Description | +
---|---|
static <T extends ResultEnum> |
+match(T[] $receiver,
+ java.lang.String identifier) |
+
public static <T extends ResultEnum> T match(T[] $receiver, + java.lang.String identifier)+
public class PagingObject<T>
+extends AbstractPagingObject
+The offset-based paging object is a container for a set of objects. It contains a key called items +(whose value is an array of the requested objects) along with other keys like previous, next and +limit that can be useful in future calls.
itemClazz
Constructor and Description | +
---|
PagingObject(java.lang.String href,
+ java.util.List<? extends T> items,
+ int limit,
+ java.lang.String next,
+ int offset,
+ java.lang.String previous,
+ int total)
+The offset-based paging object is a container for a set of objects. It contains a key called items
+(whose value is an array of the requested objects) along with other keys like previous, next and
+limit that can be useful in future calls.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyRestAction<java.util.List> |
+getAll()
+Get all PagingObjects associated with the request
+ |
+
kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> |
+getAllImpl$module() |
+
SpotifyRestAction<java.util.List> |
+getAllItems()
+Get all items of type T associated with the request
+ |
+
AbstractPagingObject<T> |
+getImpl$module(PagingTraversalType type) |
+
SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> |
+getNext()
+Get the next set of T items
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> |
+getPrevious()
+Get the previous set of T items
+ |
+
getHref, getItemClazz, getItems, getLimit, getNext, getOffset, getPrevious, getTotal, setItemClazz
public PagingObject(java.lang.String href, + java.util.List<? extends T> items, + int limit, + java.lang.String next, + int offset, + java.lang.String previous, + int total)+
The offset-based paging object is a container for a set of objects. It contains a key called items +(whose value is an array of the requested objects) along with other keys like previous, next and +limit that can be useful in future calls.
public SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> getNext()+
Get the next set of T items
public SpotifyRestAction<com.adamratzman.spotify.models.PagingObject> getPrevious()+
Get the previous set of T items
public AbstractPagingObject<T> getImpl$module(PagingTraversalType type)+
public kotlin.sequences.Sequence<com.adamratzman.spotify.models.AbstractPagingObject> getAllImpl$module()+
public SpotifyRestAction<java.util.List> getAll()+
Get all PagingObjects associated with the request
public SpotifyRestAction<java.util.List> getAllItems()+
Get all items of type T associated with the request
public class PagingObjectsKt
+public enum PagingTraversalType
+public static PagingTraversalType BACKWARDS+
public static PagingTraversalType FORWARDS+
public class PlayHistory
+Constructor and Description | +
---|
PlayHistory(SimpleTrack track,
+ java.lang.String playedAt,
+ PlayHistoryContext context) |
+
Modifier and Type | +Method and Description | +
---|---|
SimpleTrack |
+component1() |
+
java.lang.String |
+component2() |
+
PlayHistoryContext |
+component3() |
+
PlayHistory |
+copy(SimpleTrack track,
+ java.lang.String playedAt,
+ PlayHistoryContext context) |
+
boolean |
+equals(java.lang.Object p) |
+
PlayHistoryContext |
+getContext() |
+
java.lang.String |
+getPlayedAt() |
+
SimpleTrack |
+getTrack() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public PlayHistory(SimpleTrack track, + java.lang.String playedAt, + PlayHistoryContext context)+
public SimpleTrack getTrack()+
public java.lang.String getPlayedAt()+
public PlayHistoryContext getContext()+
public SimpleTrack component1()+
public java.lang.String component2()+
public PlayHistoryContext component3()+
public PlayHistory copy(SimpleTrack track, + java.lang.String playedAt, + PlayHistoryContext context)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlayHistoryContext
+Constructor and Description | +
---|
PlayHistoryContext(java.lang.String type,
+ java.lang.String href,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String uri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+component3() |
+
java.lang.String |
+component4() |
+
PlayHistoryContext |
+copy(java.lang.String type,
+ java.lang.String href,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String uri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls() |
+
java.lang.String |
+getHref() |
+
java.lang.String |
+getType() |
+
java.lang.String |
+getUri() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public PlayHistoryContext(java.lang.String type, + java.lang.String href, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String uri)+
public java.lang.String getType()+
public java.lang.String getHref()+
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
public java.lang.String getUri()+
public java.lang.String component1()+
public java.lang.String component2()+
public java.util.HashMap<java.lang.String,java.lang.String> component3()+
public java.lang.String component4()+
public PlayHistoryContext copy(java.lang.String type, + java.lang.String href, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String uri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Playlist
+Constructor and Description | +
---|
Playlist(boolean collaborative,
+ java.lang.String description,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String primaryColor,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks,
+ java.lang.String type,
+ java.lang.String _uri,
+ PlaylistURI uri,
+ ClientPlaylistAPI.Snapshot snapshot) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+component1()
+Returns true if context is not search and the owner allows other users to modify the playlist.
+ |
+
SpotifyPublicUser |
+component10()
+The user who owns the playlist
+ |
+
java.lang.Boolean |
+component11()
+The playlist’s public/private status
+ |
+
PagingObject<com.adamratzman.spotify.models.PlaylistTrack> |
+component13()
+Information about the tracks of the playlist.
+ |
+
java.lang.String |
+component14()
+The object type
+ |
+
PlaylistURI |
+component16()
+The Spotify URI for the playlist.
+ |
+
ClientPlaylistAPI.Snapshot |
+component17()
+The version identifier for the current playlist.
+ |
+
java.lang.String |
+component2()
+The playlist description.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+component3()
+Known external URLs for this playlist.
+ |
+
Followers |
+component4() |
+
java.lang.String |
+component5()
+A link to the Web API endpoint providing full details of the playlist.
+ |
+
java.lang.String |
+component6()
+The Spotify ID for the playlist.
+ |
+
java.lang.String |
+component7()
+Unknown.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component8()
+Images for the playlist.
+ |
+
java.lang.String |
+component9()
+The name of the playlist.
+ |
+
Playlist |
+copy(boolean collaborative,
+ java.lang.String description,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String primaryColor,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks,
+ java.lang.String type,
+ java.lang.String _uri,
+ PlaylistURI uri,
+ ClientPlaylistAPI.Snapshot snapshot) |
+
boolean |
+equals(java.lang.Object p) |
+
boolean |
+getCollaborative()
+Returns true if context is not search and the owner allows other users to modify the playlist.
+ |
+
java.lang.String |
+getDescription()
+The playlist description.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this playlist.
+ |
+
Followers |
+getFollowers() |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the playlist.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the playlist.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+Images for the playlist.
+ |
+
java.lang.String |
+getName()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+getOwner()
+The user who owns the playlist
+ |
+
java.lang.String |
+getPrimaryColor()
+Unknown.
+ |
+
java.lang.Boolean |
+getPublic()
+The playlist’s public/private status
+ |
+
ClientPlaylistAPI.Snapshot |
+getSnapshot()
+The version identifier for the current playlist.
+ |
+
PagingObject<com.adamratzman.spotify.models.PlaylistTrack> |
+getTracks()
+Information about the tracks of the playlist.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
PlaylistURI |
+getUri()
+The Spotify URI for the playlist.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Playlist(boolean collaborative, + java.lang.String description, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.lang.String href, + java.lang.String id, + java.lang.String primaryColor, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.Boolean p, + java.lang.String _snapshotId, + PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks, + java.lang.String type, + java.lang.String _uri, + PlaylistURI uri, + ClientPlaylistAPI.Snapshot snapshot)+
collaborative
- Returns true if context is not search and the owner allows other users to modify the playlist.Otherwise returns false.description
- The playlist description. Only returned for modified, verified playlists, otherwise null.externalUrls
- Known external URLs for this playlist.href
- A link to the Web API endpoint providing full details of the playlist.id
- The Spotify ID for the playlist.primaryColor
- Unknown.images
- Images for the playlist. The array may be empty or contain up to three images.The images are returned by size in descending order.Note: If returned, the source URL for theimage ( url ) is temporary and will expire in less than a day.name
- The name of the playlist.owner
- The user who owns the playlistp
- The playlist’s public/private status: true the playlist is public, false the playlist is private,null the playlist status is not relevanttracks
- Information about the tracks of the playlist.type
- The object type: “playlist”uri
- The Spotify URI for the playlist.snapshot
- The version identifier for the current playlist. Can be supplied in other requests to targeta specific playlist versioncollaborative
- Returns true if context is not search and the owner allows other users to modify the playlist.
+Otherwise returns false.description
- The playlist description. Only returned for modified, verified playlists, otherwise null.externalUrls
- Known external URLs for this playlist.followers
- href
- A link to the Web API endpoint providing full details of the playlist.id
- The Spotify ID for the playlist.primaryColor
- Unknown.images
- Images for the playlist. The array may be empty or contain up to three images.
+The images are returned by size in descending order.Note: If returned, the source URL for the
+image ( url ) is temporary and will expire in less than a day.name
- The name of the playlist.owner
- The user who owns the playlistsnapshot
- The version identifier for the current playlist. Can be supplied in other requests to target
+a specific playlist versiontracks
- Information about the tracks of the playlist.type
- The object type: “playlist”uri
- The Spotify URI for the playlist.public boolean getCollaborative()+
Returns true if context is not search and the owner allows other users to modify the playlist.
Otherwise returns false.
public java.lang.String getDescription()+
The playlist description.
Only returned for modified, verified playlists, otherwise null.
public java.util.Map<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this playlist.
public Followers getFollowers()+
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the playlist.
public java.lang.String getId()+
The Spotify ID for the playlist.
public java.lang.String getPrimaryColor()+
Unknown.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order.Note: If returned, the source URL for theimage ( url ) is temporary and will expire in less than a day.
public java.lang.String getName()+
The name of the playlist.
public SpotifyPublicUser getOwner()+
The user who owns the playlist
public java.lang.Boolean getPublic()+
The playlist’s public/private status
: true the playlist is public, false the playlist is private,null the playlist status is not relevant
public PagingObject<com.adamratzman.spotify.models.PlaylistTrack> getTracks()+
Information about the tracks of the playlist.
public java.lang.String getType()+
The object type
: “playlist”
public PlaylistURI getUri()+
The Spotify URI for the playlist.
public ClientPlaylistAPI.Snapshot getSnapshot()+
The version identifier for the current playlist.
Can be supplied in other requests to targeta specific playlist version
public boolean component1()+
Returns true if context is not search and the owner allows other users to modify the playlist.
Otherwise returns false.
public java.lang.String component2()+
The playlist description.
Only returned for modified, verified playlists, otherwise null.
public java.util.Map<java.lang.String,java.lang.String> component3()+
Known external URLs for this playlist.
public Followers component4()+
public java.lang.String component5()+
A link to the Web API endpoint providing full details of the playlist.
public java.lang.String component6()+
The Spotify ID for the playlist.
public java.lang.String component7()+
Unknown.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component8()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order.Note: If returned, the source URL for theimage ( url ) is temporary and will expire in less than a day.
public java.lang.String component9()+
The name of the playlist.
public SpotifyPublicUser component10()+
The user who owns the playlist
public java.lang.Boolean component11()+
The playlist’s public/private status
: true the playlist is public, false the playlist is private,null the playlist status is not relevant
public PagingObject<com.adamratzman.spotify.models.PlaylistTrack> component13()+
Information about the tracks of the playlist.
public java.lang.String component14()+
The object type
: “playlist”
public PlaylistURI component16()+
The Spotify URI for the playlist.
public ClientPlaylistAPI.Snapshot component17()+
The version identifier for the current playlist.
Can be supplied in other requests to targeta specific playlist version
public Playlist copy(boolean collaborative, + java.lang.String description, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.lang.String href, + java.lang.String id, + java.lang.String primaryColor, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.Boolean p, + java.lang.String _snapshotId, + PagingObject<com.adamratzman.spotify.models.PlaylistTrack> tracks, + java.lang.String type, + java.lang.String _uri, + PlaylistURI uri, + ClientPlaylistAPI.Snapshot snapshot)+
collaborative
- Returns true if context is not search and the owner allows other users to modify the playlist.
+Otherwise returns false.description
- The playlist description. Only returned for modified, verified playlists, otherwise null.externalUrls
- Known external URLs for this playlist.followers
- href
- A link to the Web API endpoint providing full details of the playlist.id
- The Spotify ID for the playlist.primaryColor
- Unknown.images
- Images for the playlist. The array may be empty or contain up to three images.
+The images are returned by size in descending order.Note: If returned, the source URL for the
+image ( url ) is temporary and will expire in less than a day.name
- The name of the playlist.owner
- The user who owns the playlistsnapshot
- The version identifier for the current playlist. Can be supplied in other requests to target
+a specific playlist versiontracks
- Information about the tracks of the playlist.type
- The object type: “playlist”uri
- The Spotify URI for the playlist.public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlaylistTrack
+Constructor and Description | +
---|
PlaylistTrack(java.lang.String primaryColor,
+ java.lang.String addedAt,
+ SpotifyPublicUser addedBy,
+ java.lang.Boolean isLocal,
+ Track track,
+ VideoThumbnail videoThumbnail) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+Unknown.
+ |
+
java.lang.String |
+component2()
+The date and time the track was added.
+ |
+
SpotifyPublicUser |
+component3()
+The Spotify user who added the track.
+ |
+
java.lang.Boolean |
+component4()
+Whether this track is a local file or not.
+ |
+
Track |
+component5()
+Information about the track.
+ |
+
VideoThumbnail |
+component6() |
+
PlaylistTrack |
+copy(java.lang.String primaryColor,
+ java.lang.String addedAt,
+ SpotifyPublicUser addedBy,
+ java.lang.Boolean isLocal,
+ Track track,
+ VideoThumbnail videoThumbnail) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAddedAt()
+The date and time the track was added.
+ |
+
SpotifyPublicUser |
+getAddedBy()
+The Spotify user who added the track.
+ |
+
java.lang.String |
+getPrimaryColor()
+Unknown.
+ |
+
Track |
+getTrack()
+Information about the track.
+ |
+
VideoThumbnail |
+getVideoThumbnail() |
+
int |
+hashCode() |
+
java.lang.Boolean |
+isLocal()
+Whether this track is a local file or not.
+ |
+
java.lang.String |
+toString() |
+
public PlaylistTrack(java.lang.String primaryColor, + java.lang.String addedAt, + SpotifyPublicUser addedBy, + java.lang.Boolean isLocal, + Track track, + VideoThumbnail videoThumbnail)+
primaryColor
- Unknown. Spotify has released no information about thisaddedAt
- The date and time the track was added. Note that some very old playlists may return null in this field.addedBy
- The Spotify user who added the track. Note that some very old playlists may return null in this field.isLocal
- Whether this track is a local file or not.track
- Information about the track.public java.lang.String getPrimaryColor()+
Unknown.
Spotify has released no information about this
public java.lang.String getAddedAt()+
The date and time the track was added.
Note that some very old playlists may return null in this field.
public SpotifyPublicUser getAddedBy()+
The Spotify user who added the track.
Note that some very old playlists may return null in this field.
public java.lang.Boolean isLocal()+
Whether this track is a local file or not.
public Track getTrack()+
Information about the track.
public VideoThumbnail getVideoThumbnail()+
public java.lang.String component1()+
Unknown.
Spotify has released no information about this
public java.lang.String component2()+
The date and time the track was added.
Note that some very old playlists may return null in this field.
public SpotifyPublicUser component3()+
The Spotify user who added the track.
Note that some very old playlists may return null in this field.
public java.lang.Boolean component4()+
Whether this track is a local file or not.
public Track component5()+
Information about the track.
public VideoThumbnail component6()+
public PlaylistTrack copy(java.lang.String primaryColor, + java.lang.String addedAt, + SpotifyPublicUser addedBy, + java.lang.Boolean isLocal, + Track track, + VideoThumbnail videoThumbnail)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlaylistTrackInfo
+A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks +can be retrieved, along with the total number of tracks in the playlist.
Constructor and Description | +
---|
PlaylistTrackInfo(java.lang.String href,
+ int total)
+A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks
+can be retrieved, along with the total number of tracks in the playlist.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+link to the Web API endpoint where full details of the playlist’s tracks
+ |
+
int |
+component2()
+the total number of tracks in the playlist.
+ |
+
PlaylistTrackInfo |
+copy(java.lang.String href,
+ int total)
+A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks
+can be retrieved, along with the total number of tracks in the playlist.
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getHref()
+link to the Web API endpoint where full details of the playlist’s tracks
+ |
+
int |
+getTotal()
+the total number of tracks in the playlist.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public PlaylistTrackInfo(java.lang.String href, + int total)+
A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks +can be retrieved, along with the total number of tracks in the playlist.
href
- link to the Web API endpoint where full details of the playlist’s trackscan be retrievedtotal
- the total number of tracks in the playlist.public java.lang.String getHref()+
link to the Web API endpoint where full details of the playlist’s tracks
can be retrieved
public int getTotal()+
the total number of tracks in the playlist.
public java.lang.String component1()+
link to the Web API endpoint where full details of the playlist’s tracks
can be retrieved
public int component2()+
the total number of tracks in the playlist.
public PlaylistTrackInfo copy(java.lang.String href, + int total)+
A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks +can be retrieved, along with the total number of tracks in the playlist.
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class PlaylistURI
+extends SpotifyUri
+Represents a Spotify Playlist URI, parsed from either a Spotify ID or taken from an endpoint.
Constructor and Description | +
---|
PlaylistURI(java.lang.String input)
+Represents a Spotify Playlist URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
getId, getUri
public class RecommendationResponse
+Constructor and Description | +
---|
RecommendationResponse(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds,
+ java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.RecommendationSeed> |
+component1()
+An array of recommendation seed objects.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleTrack> |
+component2()
+An array of track object
+ |
+
RecommendationResponse |
+copy(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds,
+ java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.RecommendationSeed> |
+getSeeds()
+An array of recommendation seed objects.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleTrack> |
+getTracks()
+An array of track object
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public RecommendationResponse(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds, + java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks)+
seeds
- An array of recommendation seed objects.tracks
- An array of track object (simplified) ordered according to the parameters supplied.public java.util.List<com.adamratzman.spotify.models.RecommendationSeed> getSeeds()+
An array of recommendation seed objects.
public java.util.List<com.adamratzman.spotify.models.SimpleTrack> getTracks()+
An array of track object
(simplified) ordered according to the parameters supplied.
public java.util.List<com.adamratzman.spotify.models.RecommendationSeed> component1()+
An array of recommendation seed objects.
public java.util.List<com.adamratzman.spotify.models.SimpleTrack> component2()+
An array of track object
(simplified) ordered according to the parameters supplied.
public RecommendationResponse copy(java.util.List<com.adamratzman.spotify.models.RecommendationSeed> seeds, + java.util.List<com.adamratzman.spotify.models.SimpleTrack> tracks)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class RecommendationSeed
+Seed from which the recommendation was constructed
Constructor and Description | +
---|
RecommendationSeed(int initialPoolSize,
+ int afterFilteringSize,
+ java.lang.Integer afterRelinkingSize,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String type)
+Seed from which the recommendation was constructed
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component1()
+The number of recommended tracks available for this seed.
+ |
+
int |
+component2()
+The number of tracks available after min
+ |
+
java.lang.Integer |
+component3()
+The number of tracks available after relinking for regional availability.
+ |
+
java.lang.String |
+component4()
+A link to the full track or artist data for this seed.
+ |
+
java.lang.String |
+component5()
+The id used to select this seed.
+ |
+
java.lang.String |
+component6()
+The entity type of this seed.
+ |
+
RecommendationSeed |
+copy(int initialPoolSize,
+ int afterFilteringSize,
+ java.lang.Integer afterRelinkingSize,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String type)
+Seed from which the recommendation was constructed
+ |
+
boolean |
+equals(java.lang.Object p) |
+
int |
+getAfterFilteringSize()
+The number of tracks available after min
+ |
+
java.lang.Integer |
+getAfterRelinkingSize()
+The number of tracks available after relinking for regional availability.
+ |
+
java.lang.String |
+getHref()
+A link to the full track or artist data for this seed.
+ |
+
java.lang.String |
+getId()
+The id used to select this seed.
+ |
+
int |
+getInitialPoolSize()
+The number of recommended tracks available for this seed.
+ |
+
java.lang.String |
+getType()
+The entity type of this seed.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public RecommendationSeed(int initialPoolSize, + int afterFilteringSize, + java.lang.Integer afterRelinkingSize, + java.lang.String href, + java.lang.String id, + java.lang.String type)+
Seed from which the recommendation was constructed
initialPoolSize
- The number of recommended tracks available for this seed.afterFilteringSize
- The number of tracks available after min_* and max_* filters have been applied.afterRelinkingSize
- The number of tracks available after relinking for regional availability.href
- A link to the full track or artist data for this seed. For tracks this will be a link to a TrackObject. For artists a link to an Artist Object. For genre seeds, this value will be null.id
- The id used to select this seed. This will be the same as the string used in theseed_artists , seed_tracks or seed_genres parameter.type
- The entity type of this seed. One of artist , track or genre.public int getInitialPoolSize()+
The number of recommended tracks available for this seed.
public int getAfterFilteringSize()+
The number of tracks available after min
_* and max_* filters have been applied.
public java.lang.Integer getAfterRelinkingSize()+
The number of tracks available after relinking for regional availability.
public java.lang.String getHref()+
A link to the full track or artist data for this seed.
For tracks this will be a link to a TrackObject. For artists a link to an Artist Object. For genre seeds, this value will be null.
public java.lang.String getId()+
The id used to select this seed.
This will be the same as the string used in theseed_artists , seed_tracks or seed_genres parameter.
public java.lang.String getType()+
The entity type of this seed.
One of artist , track or genre.
public int component1()+
The number of recommended tracks available for this seed.
public int component2()+
The number of tracks available after min
_* and max_* filters have been applied.
public java.lang.Integer component3()+
The number of tracks available after relinking for regional availability.
public java.lang.String component4()+
A link to the full track or artist data for this seed.
For tracks this will be a link to a TrackObject. For artists a link to an Artist Object. For genre seeds, this value will be null.
public java.lang.String component5()+
The id used to select this seed.
This will be the same as the string used in theseed_artists , seed_tracks or seed_genres parameter.
public java.lang.String component6()+
The entity type of this seed.
One of artist , track or genre.
public RecommendationSeed copy(int initialPoolSize, + int afterFilteringSize, + java.lang.Integer afterRelinkingSize, + java.lang.String href, + java.lang.String id, + java.lang.String type)+
Seed from which the recommendation was constructed
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class RelinkingAvailableResponse
+extends Linkable
+Constructor and Description | +
---|
RelinkingAvailableResponse(LinkedTrack linkedTrack) |
+
RelinkingAvailableResponse() |
+
Modifier and Type | +Method and Description | +
---|---|
LinkedTrack |
+getLinkedTrack() |
+
boolean |
+isRelinked() |
+
public RelinkingAvailableResponse(LinkedTrack linkedTrack)+
public RelinkingAvailableResponse()+
public boolean isRelinked()+
public LinkedTrack getLinkedTrack()+
public class Restrictions
+Contains an explanation of why a track is not available
Constructor and Description | +
---|
Restrictions(java.lang.String reason)
+Contains an explanation of why a track is not available
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+why the track is not available
+ |
+
Restrictions |
+copy(java.lang.String reason)
+Contains an explanation of why a track is not available
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getReason()
+why the track is not available
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Restrictions(java.lang.String reason)+
Contains an explanation of why a track is not available
reason
- why the track is not availablepublic java.lang.String getReason()+
why the track is not available
public java.lang.String component1()+
why the track is not available
public Restrictions copy(java.lang.String reason)+
Contains an explanation of why a track is not available
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SavedAlbum
+Constructor and Description | +
---|
SavedAlbum(java.lang.String addedAt,
+ Album album) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The date and time the album was saved.
+ |
+
Album |
+component2() |
+
SavedAlbum |
+copy(java.lang.String addedAt,
+ Album album) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAddedAt()
+The date and time the album was saved.
+ |
+
Album |
+getAlbum() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SavedAlbum(java.lang.String addedAt, + Album album)+
addedAt
- The date and time the album was saved.public java.lang.String getAddedAt()+
The date and time the album was saved.
public Album getAlbum()+
public java.lang.String component1()+
The date and time the album was saved.
public Album component2()+
public SavedAlbum copy(java.lang.String addedAt, + Album album)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SavedTrack
+Constructor and Description | +
---|
SavedTrack(java.lang.String addedAt,
+ Track track) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The date and time the track was saved.
+ |
+
Track |
+component2()
+Information about the track.
+ |
+
SavedTrack |
+copy(java.lang.String addedAt,
+ Track track) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAddedAt()
+The date and time the track was saved.
+ |
+
Track |
+getTrack()
+Information about the track.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SavedTrack(java.lang.String addedAt, + Track track)+
addedAt
- The date and time the track was saved.track
- Information about the track.public java.lang.String getAddedAt()+
The date and time the track was saved.
public Track getTrack()+
Information about the track.
public java.lang.String component1()+
The date and time the track was saved.
public Track component2()+
Information about the track.
public SavedTrack copy(java.lang.String addedAt, + Track track)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimpleAlbum
+extends Linkable
+Constructor and Description | +
---|
SimpleAlbum(java.lang.String _albumType,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ java.lang.String type,
+ java.lang.String _uri,
+ AlbumURI uri,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ java.lang.Integer totalTracks,
+ java.lang.String albumGroupString,
+ Restrictions restrictions,
+ AlbumResultType albumGroup) |
+
Modifier and Type | +Method and Description | +
---|---|
AlbumURI |
+component11()
+The Spotify URI for the album.
+ |
+
java.lang.String |
+component12()
+The date the album was first released,
+ |
+
java.lang.String |
+component13()
+The precision with which release
+ |
+
java.lang.Integer |
+component14() |
+
Restrictions |
+component16()
+Part of the response when Track Relinking is applied,
+ |
+
AlbumResultType |
+component17()
+Optional.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component2()
+The artists of the album.
+ |
+
java.util.List<java.lang.String> |
+component3()
+The markets in which the album is available
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+component4()
+Known external URLs for this album.
+ |
+
java.lang.String |
+component5()
+A link to the Web API endpoint providing full details of the album.
+ |
+
java.lang.String |
+component6()
+The Spotify id for the album
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component7()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+component8()
+The name of the album.
+ |
+
java.lang.String |
+component9()
+The object type
+ |
+
SimpleAlbum |
+copy(java.lang.String _albumType,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ java.lang.String type,
+ java.lang.String _uri,
+ AlbumURI uri,
+ java.lang.String releaseDate,
+ java.lang.String releaseDatePrecision,
+ java.lang.Integer totalTracks,
+ java.lang.String albumGroupString,
+ Restrictions restrictions,
+ AlbumResultType albumGroup) |
+
boolean |
+equals(java.lang.Object p) |
+
AlbumResultType |
+getAlbumGroup()
+Optional.
+ |
+
AlbumResultType |
+getAlbumType()
+The type of the album: one of “album”, “single”, or “compilation”.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists of the album.
+ |
+
java.util.List<java.lang.String> |
+getAvailableMarkets()
+The markets in which the album is available
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this album.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the album.
+ |
+
java.lang.String |
+getId()
+The Spotify id for the album
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The cover art for the album in various sizes,
+ |
+
java.lang.String |
+getName()
+The name of the album.
+ |
+
java.lang.String |
+getReleaseDate()
+The date the album was first released,
+ |
+
java.lang.String |
+getReleaseDatePrecision()
+The precision with which release
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
java.lang.Integer |
+getTotalTracks() |
+
java.lang.String |
+getType()
+The object type
+ |
+
AlbumURI |
+getUri()
+The Spotify URI for the album.
+ |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Album> |
+toFullAlbum(Market market) |
+
java.lang.String |
+toString() |
+
public SimpleAlbum(java.lang.String _albumType, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + java.lang.String type, + java.lang.String _uri, + AlbumURI uri, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + java.lang.Integer totalTracks, + java.lang.String albumGroupString, + Restrictions restrictions, + AlbumResultType albumGroup)+
artists
- The artists of the album. Each artist object includes a link in href to more detailed information about the artist.availableMarkets
- The markets in which the album is available: ISO 3166-1 alpha-2 country codes. Notethat an album is considered available in a market when at least 1 of its tracks is available in that market.externalUrls
- Known external URLs for this album.href
- A link to the Web API endpoint providing full details of the album.id
- The Spotify id for the albumimages
- The cover art for the album in various sizes, widest first.name
- The name of the album. In case of an album takedown, the value may be an empty string.type
- The object type: “album”uri
- The Spotify URI for the album.releaseDate
- The date the album was first released, for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.releaseDatePrecision
- The precision with which release_date value is known: year , month , or day.restrictions
- Part of the response when Track Relinking is applied, the original track is not availablein the given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}albumGroup
- Optional. The field is present when getting an artist’s albums. Possible valuesare “album”, “single”, “compilation”, “appears_on”. Compare to album_type this field represents relationshipbetween the artist and the album.public AlbumResultType getAlbumType()+
The type of the album: one of “album”, “single”, or “compilation”.
public SpotifyRestAction<com.adamratzman.spotify.models.Album> toFullAlbum(Market market)+
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists of the album.
Each artist object includes a link in href to more detailed information about the artist.
public java.util.List<java.lang.String> getAvailableMarkets()+
The markets in which the album is available
: ISO 3166-1 alpha-2 country codes. Notethat an album is considered available in a market when at least 1 of its tracks is available in that market.
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this album.
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the album.
public java.lang.String getId()+
The Spotify id for the album
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The cover art for the album in various sizes,
widest first.
public java.lang.String getName()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public java.lang.String getType()+
The object type
: “album”
public AlbumURI getUri()+
The Spotify URI for the album.
public java.lang.String getReleaseDate()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String getReleaseDatePrecision()+
The precision with which release
_date value is known: year , month , or day.
public java.lang.Integer getTotalTracks()+
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public AlbumResultType getAlbumGroup()+
Optional.
The field is present when getting an artist’s albums. Possible valuesare “album”, “single”, “compilation”, “appears_on”. Compare to album_type this field represents relationshipbetween the artist and the album.
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component2()+
The artists of the album.
Each artist object includes a link in href to more detailed information about the artist.
public java.util.List<java.lang.String> component3()+
The markets in which the album is available
: ISO 3166-1 alpha-2 country codes. Notethat an album is considered available in a market when at least 1 of its tracks is available in that market.
public java.util.HashMap<java.lang.String,java.lang.String> component4()+
Known external URLs for this album.
public java.lang.String component5()+
A link to the Web API endpoint providing full details of the album.
public java.lang.String component6()+
The Spotify id for the album
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component7()+
The cover art for the album in various sizes,
widest first.
public java.lang.String component8()+
The name of the album.
In case of an album takedown, the value may be an empty string.
public java.lang.String component9()+
The object type
: “album”
public AlbumURI component11()+
The Spotify URI for the album.
public java.lang.String component12()+
The date the album was first released,
for example 1981. Depending on the precision,it might be shown as 1981-12 or 1981-12-15.
public java.lang.String component13()+
The precision with which release
_date value is known: year , month , or day.
public java.lang.Integer component14()+
public Restrictions component16()+
Part of the response when Track Relinking is applied,
the original track is not availablein the given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public AlbumResultType component17()+
Optional.
The field is present when getting an artist’s albums. Possible valuesare “album”, “single”, “compilation”, “appears_on”. Compare to album_type this field represents relationshipbetween the artist and the album.
public SimpleAlbum copy(java.lang.String _albumType, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + java.lang.String type, + java.lang.String _uri, + AlbumURI uri, + java.lang.String releaseDate, + java.lang.String releaseDatePrecision, + java.lang.Integer totalTracks, + java.lang.String albumGroupString, + Restrictions restrictions, + AlbumResultType albumGroup)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimpleArtist
+extends Linkable
+Constructor and Description | +
---|
SimpleArtist(java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String name,
+ java.lang.String type,
+ java.lang.String _uri,
+ ArtistURI uri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.HashMap<java.lang.String,java.lang.String> |
+component1()
+Known external URLs for this artist.
+ |
+
java.lang.String |
+component2()
+A link to the Web API endpoint providing full details of the artist.
+ |
+
java.lang.String |
+component3()
+The Spotify ID for the artist.
+ |
+
java.lang.String |
+component4()
+The name of the artist
+ |
+
java.lang.String |
+component5()
+The object type
+ |
+
ArtistURI |
+component7()
+The Spotify URI for the artist.
+ |
+
SimpleArtist |
+copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.lang.String name,
+ java.lang.String type,
+ java.lang.String _uri,
+ ArtistURI uri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this artist.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the artist.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the artist.
+ |
+
java.lang.String |
+getName()
+The name of the artist
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
ArtistURI |
+getUri()
+The Spotify URI for the artist.
+ |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Artist> |
+toFullArtist() |
+
java.lang.String |
+toString() |
+
public SimpleArtist(java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.lang.String name, + java.lang.String type, + java.lang.String _uri, + ArtistURI uri)+
externalUrls
- Known external URLs for this artist.href
- A link to the Web API endpoint providing full details of the artist.id
- The Spotify ID for the artist.name
- The name of the artisttype
- The object type: "artist"uri
- The Spotify URI for the artist.public SpotifyRestAction<com.adamratzman.spotify.models.Artist> toFullArtist()+
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this artist.
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the artist.
public java.lang.String getId()+
The Spotify ID for the artist.
public java.lang.String getName()+
The name of the artist
public java.lang.String getType()+
The object type
: "artist"
public ArtistURI getUri()+
The Spotify URI for the artist.
public java.util.HashMap<java.lang.String,java.lang.String> component1()+
Known external URLs for this artist.
public java.lang.String component2()+
A link to the Web API endpoint providing full details of the artist.
public java.lang.String component3()+
The Spotify ID for the artist.
public java.lang.String component4()+
The name of the artist
public java.lang.String component5()+
The object type
: "artist"
public ArtistURI component7()+
The Spotify URI for the artist.
public SimpleArtist copy(java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.lang.String name, + java.lang.String type, + java.lang.String _uri, + ArtistURI uri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimplePlaylist
+extends Linkable
+Constructor and Description | +
---|
SimplePlaylist(boolean collaborative,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.String primaryColor,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PlaylistTrackInfo tracks,
+ java.lang.String type,
+ java.lang.String _uri,
+ PlaylistURI uri,
+ ClientPlaylistAPI.Snapshot snapshot) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+component1()
+Returns true if context is not search and the owner allows other users to
+ |
+
PlaylistTrackInfo |
+component11()
+A collection containing a link
+ |
+
java.lang.String |
+component12()
+The object type
+ |
+
PlaylistURI |
+component14()
+The Spotify URI for the playlist.
+ |
+
ClientPlaylistAPI.Snapshot |
+component15()
+The version identifier for the current playlist.
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+component2()
+Known external URLs for this playlist.
+ |
+
java.lang.String |
+component3()
+A link to the Web API endpoint providing full details of the playlist.
+ |
+
java.lang.String |
+component4()
+The Spotify ID for the playlist.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component5()
+Images for the playlist.
+ |
+
java.lang.String |
+component6()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+component7()
+The user who owns the playlist
+ |
+
java.lang.String |
+component8()
+Unknown.
+ |
+
java.lang.Boolean |
+component9()
+The playlist’s public/private status
+ |
+
SimplePlaylist |
+copy(boolean collaborative,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String name,
+ SpotifyPublicUser owner,
+ java.lang.String primaryColor,
+ java.lang.Boolean p,
+ java.lang.String _snapshotId,
+ PlaylistTrackInfo tracks,
+ java.lang.String type,
+ java.lang.String _uri,
+ PlaylistURI uri,
+ ClientPlaylistAPI.Snapshot snapshot) |
+
boolean |
+equals(java.lang.Object p) |
+
boolean |
+getCollaborative()
+Returns true if context is not search and the owner allows other users to
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this playlist.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the playlist.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the playlist.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+Images for the playlist.
+ |
+
java.lang.String |
+getName()
+The name of the playlist.
+ |
+
SpotifyPublicUser |
+getOwner()
+The user who owns the playlist
+ |
+
java.lang.String |
+getPrimaryColor()
+Unknown.
+ |
+
java.lang.Boolean |
+getPublic()
+The playlist’s public/private status
+ |
+
ClientPlaylistAPI.Snapshot |
+getSnapshot()
+The version identifier for the current playlist.
+ |
+
PlaylistTrackInfo |
+getTracks()
+A collection containing a link
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
PlaylistURI |
+getUri()
+The Spotify URI for the playlist.
+ |
+
int |
+hashCode() |
+
SpotifyRestAction<com.adamratzman.spotify.models.Playlist> |
+toFullPlaylist(Market market) |
+
java.lang.String |
+toString() |
+
public SimplePlaylist(boolean collaborative, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.String primaryColor, + java.lang.Boolean p, + java.lang.String _snapshotId, + PlaylistTrackInfo tracks, + java.lang.String type, + java.lang.String _uri, + PlaylistURI uri, + ClientPlaylistAPI.Snapshot snapshot)+
collaborative
- Returns true if context is not search and the owner allows other users tomodify the playlist. Otherwise returns false.externalUrls
- Known external URLs for this playlist.href
- A link to the Web API endpoint providing full details of the playlist.id
- The Spotify ID for the playlist.images
- Images for the playlist. The array may be empty or contain up to three images.The images are returned by size in descending order. See Working with Playlists.Note: If returned, the source URL for the image ( url ) is temporary and will expire in less than a day.name
- The name of the playlist.owner
- The user who owns the playlistprimaryColor
- Unknown.p
- The playlist’s public/private status: true the playlist is public, false theplaylist is private, null the playlist status is not relevant.tracks
- A collection containing a link ( href ) to the Web API endpoint where full details of theplaylist’s tracks can be retrieved, along with the total number of tracks in the playlist.type
- The object type: “playlist”uri
- The Spotify URI for the playlist.snapshot
- The version identifier for the current playlist. Can be supplied in otherrequests to target a specific playlist versionpublic SpotifyRestAction<com.adamratzman.spotify.models.Playlist> toFullPlaylist(Market market)+
public boolean getCollaborative()+
Returns true if context is not search and the owner allows other users to
modify the playlist. Otherwise returns false.
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this playlist.
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the playlist.
public java.lang.String getId()+
The Spotify ID for the playlist.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order. See Working with Playlists.Note: If returned, the source URL for the image ( url ) is temporary and will expire in less than a day.
public java.lang.String getName()+
The name of the playlist.
public SpotifyPublicUser getOwner()+
The user who owns the playlist
public java.lang.String getPrimaryColor()+
Unknown.
public java.lang.Boolean getPublic()+
The playlist’s public/private status
: true the playlist is public, false theplaylist is private, null the playlist status is not relevant.
public PlaylistTrackInfo getTracks()+
A collection containing a link
( href ) to the Web API endpoint where full details of theplaylist’s tracks can be retrieved, along with the total number of tracks in the playlist.
public java.lang.String getType()+
The object type
: “playlist”
public PlaylistURI getUri()+
The Spotify URI for the playlist.
public ClientPlaylistAPI.Snapshot getSnapshot()+
The version identifier for the current playlist.
Can be supplied in otherrequests to target a specific playlist version
public boolean component1()+
Returns true if context is not search and the owner allows other users to
modify the playlist. Otherwise returns false.
public java.util.HashMap<java.lang.String,java.lang.String> component2()+
Known external URLs for this playlist.
public java.lang.String component3()+
A link to the Web API endpoint providing full details of the playlist.
public java.lang.String component4()+
The Spotify ID for the playlist.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component5()+
Images for the playlist.
The array may be empty or contain up to three images.The images are returned by size in descending order. See Working with Playlists.Note: If returned, the source URL for the image ( url ) is temporary and will expire in less than a day.
public java.lang.String component6()+
The name of the playlist.
public SpotifyPublicUser component7()+
The user who owns the playlist
public java.lang.String component8()+
Unknown.
public java.lang.Boolean component9()+
The playlist’s public/private status
: true the playlist is public, false theplaylist is private, null the playlist status is not relevant.
public PlaylistTrackInfo component11()+
A collection containing a link
( href ) to the Web API endpoint where full details of theplaylist’s tracks can be retrieved, along with the total number of tracks in the playlist.
public java.lang.String component12()+
The object type
: “playlist”
public PlaylistURI component14()+
The Spotify URI for the playlist.
public ClientPlaylistAPI.Snapshot component15()+
The version identifier for the current playlist.
Can be supplied in otherrequests to target a specific playlist version
public SimplePlaylist copy(boolean collaborative, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String name, + SpotifyPublicUser owner, + java.lang.String primaryColor, + java.lang.Boolean p, + java.lang.String _snapshotId, + PlaylistTrackInfo tracks, + java.lang.String type, + java.lang.String _uri, + PlaylistURI uri, + ClientPlaylistAPI.Snapshot snapshot)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SimpleTrack
+extends RelinkingAvailableResponse
+Constructor and Description | +
---|
SimpleTrack(java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.util.HashMap<java.lang.String,java.lang.String> externalIds,
+ java.lang.String href,
+ java.lang.String id,
+ boolean isPlayable,
+ LinkedTrack linkedFrom,
+ java.lang.String name,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri,
+ java.lang.Boolean isLocal,
+ java.lang.Integer popularity,
+ Restrictions restrictions) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component1()
+The artists who performed the track.
+ |
+
boolean |
+component10()
+Part of the response when Track Relinking is applied.
+ |
+
java.lang.String |
+component12()
+The name of the track.
+ |
+
java.lang.String |
+component13()
+A URL to a 30 second preview
+ |
+
int |
+component14()
+The number of the track.
+ |
+
java.lang.String |
+component15()
+The object type
+ |
+
TrackURI |
+component17()
+The Spotify URI for the track.
+ |
+
java.lang.Boolean |
+component18()
+Whether or not the track is from a local file.
+ |
+
java.lang.Integer |
+component19()
+the popularity of this track.
+ |
+
java.util.List<java.lang.String> |
+component2()
+A list of the countries in which the track can be played,
+ |
+
Restrictions |
+component20()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+component3()
+The disc number
+ |
+
int |
+component4()
+The track length in milliseconds.
+ |
+
boolean |
+component5()
+Whether or not the track has explicit lyrics
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+component6()
+External URLs for this track.
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+component7()
+External IDs for this track.
+ |
+
java.lang.String |
+component8()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+component9()
+The Spotify ID for the track.
+ |
+
SimpleTrack |
+copy(java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ java.util.HashMap<java.lang.String,java.lang.String> externalIds,
+ java.lang.String href,
+ java.lang.String id,
+ boolean isPlayable,
+ LinkedTrack linkedFrom,
+ java.lang.String name,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri,
+ java.lang.Boolean isLocal,
+ java.lang.Integer popularity,
+ Restrictions restrictions) |
+
boolean |
+equals(java.lang.Object p) |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists who performed the track.
+ |
+
java.util.List<java.lang.String> |
+getAvailableMarkets()
+A list of the countries in which the track can be played,
+ |
+
int |
+getDiscNumber()
+The disc number
+ |
+
int |
+getDurationMs()
+The track length in milliseconds.
+ |
+
boolean |
+getExplicit()
+Whether or not the track has explicit lyrics
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalIds()
+External IDs for this track.
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls()
+External URLs for this track.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the track.
+ |
+
java.lang.String |
+getName()
+The name of the track.
+ |
+
java.lang.Integer |
+getPopularity()
+the popularity of this track.
+ |
+
java.lang.String |
+getPreviewUrl()
+A URL to a 30 second preview
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+getTrackNumber()
+The number of the track.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
TrackURI |
+getUri()
+The Spotify URI for the track.
+ |
+
int |
+hashCode() |
+
java.lang.Boolean |
+isLocal()
+Whether or not the track is from a local file.
+ |
+
boolean |
+isPlayable()
+Part of the response when Track Relinking is applied.
+ |
+
SpotifyRestAction<com.adamratzman.spotify.models.Track> |
+toFullTrack(Market market) |
+
java.lang.String |
+toString() |
+
getLinkedTrack, isRelinked
public SimpleTrack(java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + int discNumber, + int durationMs, + boolean explicit, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.util.HashMap<java.lang.String,java.lang.String> externalIds, + java.lang.String href, + java.lang.String id, + boolean isPlayable, + LinkedTrack linkedFrom, + java.lang.String name, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.String _uri, + TrackURI uri, + java.lang.Boolean isLocal, + java.lang.Integer popularity, + Restrictions restrictions)+
artists
- The artists who performed the track. Each artist object includes a link in href tomore detailed information about the artist.availableMarkets
- A list of the countries in which the track can be played,identified by their ISO 3166-1 alpha-2 code.discNumber
- The disc number (usually 1 unless the album consists of more than one disc).durationMs
- The track length in milliseconds.explicit
- Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).externalUrls
- External URLs for this track.externalIds
- External IDs for this track.href
- A link to the Web API endpoint providing full details of the track.id
- The Spotify ID for the track.isPlayable
- Part of the response when Track Relinking is applied. If true ,the track is playable in the given market. Otherwise false.name
- The name of the track.previewUrl
- A URL to a 30 second preview (MP3 format) of the track.trackNumber
- The number of the track. If an album has several discs, the track numberis the number on the specified disc.type
- The object type: “track”.uri
- The Spotify URI for the track.isLocal
- Whether or not the track is from a local file.popularity
- the popularity of this track. possibly nullrestrictions
- Part of the response when Track Relinking is applied, the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}public SpotifyRestAction<com.adamratzman.spotify.models.Track> toFullTrack(Market market)+
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists who performed the track.
Each artist object includes a link in href tomore detailed information about the artist.
public java.util.List<java.lang.String> getAvailableMarkets()+
A list of the countries in which the track can be played,
identified by their ISO 3166-1 alpha-2 code.
public int getDiscNumber()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int getDurationMs()+
The track length in milliseconds.
public boolean getExplicit()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
External URLs for this track.
public java.util.HashMap<java.lang.String,java.lang.String> getExternalIds()+
External IDs for this track.
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String getId()+
The Spotify ID for the track.
public boolean isPlayable()+
Part of the response when Track Relinking is applied.
If true ,the track is playable in the given market. Otherwise false.
public java.lang.String getName()+
The name of the track.
public java.lang.String getPreviewUrl()+
A URL to a 30 second preview
(MP3 format) of the track.
public int getTrackNumber()+
The number of the track.
If an album has several discs, the track numberis the number on the specified disc.
public java.lang.String getType()+
The object type
: “track”.
public TrackURI getUri()+
The Spotify URI for the track.
public java.lang.Boolean isLocal()+
Whether or not the track is from a local file.
public java.lang.Integer getPopularity()+
the popularity of this track.
possibly null
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component1()+
The artists who performed the track.
Each artist object includes a link in href tomore detailed information about the artist.
public java.util.List<java.lang.String> component2()+
A list of the countries in which the track can be played,
identified by their ISO 3166-1 alpha-2 code.
public int component3()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int component4()+
The track length in milliseconds.
public boolean component5()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public java.util.HashMap<java.lang.String,java.lang.String> component6()+
External URLs for this track.
public java.util.HashMap<java.lang.String,java.lang.String> component7()+
External IDs for this track.
public java.lang.String component8()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String component9()+
The Spotify ID for the track.
public boolean component10()+
Part of the response when Track Relinking is applied.
If true ,the track is playable in the given market. Otherwise false.
public java.lang.String component12()+
The name of the track.
public java.lang.String component13()+
A URL to a 30 second preview
(MP3 format) of the track.
public int component14()+
The number of the track.
If an album has several discs, the track numberis the number on the specified disc.
public java.lang.String component15()+
The object type
: “track”.
public TrackURI component17()+
The Spotify URI for the track.
public java.lang.Boolean component18()+
Whether or not the track is from a local file.
public java.lang.Integer component19()+
the popularity of this track.
possibly null
public Restrictions component20()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public SimpleTrack copy(java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + int discNumber, + int durationMs, + boolean explicit, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + java.util.HashMap<java.lang.String,java.lang.String> externalIds, + java.lang.String href, + java.lang.String id, + boolean isPlayable, + LinkedTrack linkedFrom, + java.lang.String name, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.String _uri, + TrackURI uri, + java.lang.Boolean isLocal, + java.lang.Integer popularity, + Restrictions restrictions)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyCategory
+Spotify music category
Constructor and Description | +
---|
SpotifyCategory(java.lang.String href,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons,
+ java.lang.String id,
+ java.lang.String name)
+Spotify music category
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+A link to the Web API endpoint returning full details of the category.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component2()
+The category icon,
+ |
+
java.lang.String |
+component3()
+The Spotify category ID of the category.
+ |
+
java.lang.String |
+component4()
+The name of the category.
+ |
+
SpotifyCategory |
+copy(java.lang.String href,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons,
+ java.lang.String id,
+ java.lang.String name)
+Spotify music category
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint returning full details of the category.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getIcons()
+The category icon,
+ |
+
java.lang.String |
+getId()
+The Spotify category ID of the category.
+ |
+
java.lang.String |
+getName()
+The name of the category.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyCategory(java.lang.String href, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons, + java.lang.String id, + java.lang.String name)+
Spotify music category
href
- A link to the Web API endpoint returning full details of the category.icons
- The category icon, in various sizes.id
- The Spotify category ID of the category.name
- The name of the category.public java.lang.String getHref()+
A link to the Web API endpoint returning full details of the category.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getIcons()+
The category icon,
in various sizes.
public java.lang.String getId()+
The Spotify category ID of the category.
public java.lang.String getName()+
The name of the category.
public java.lang.String component1()+
A link to the Web API endpoint returning full details of the category.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component2()+
The category icon,
in various sizes.
public java.lang.String component3()+
The Spotify category ID of the category.
public java.lang.String component4()+
The name of the category.
public SpotifyCategory copy(java.lang.String href, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> icons, + java.lang.String id, + java.lang.String name)+
Spotify music category
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyCopyright
+Describes an album's copyright
Constructor and Description | +
---|
SpotifyCopyright(java.lang.String text,
+ java.lang.String type)
+Describes an album's copyright
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The copyright text for this album.
+ |
+
java.lang.String |
+component2()
+The type of copyright
+ |
+
SpotifyCopyright |
+copy(java.lang.String text,
+ java.lang.String type)
+Describes an album's copyright
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getText()
+The copyright text for this album.
+ |
+
java.lang.String |
+getType()
+The type of copyright
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyCopyright(java.lang.String text, + java.lang.String type)+
Describes an album's copyright
text
- The copyright text for this album.type
- The type of copyright: C = the copyright,P = the sound recording (performance) copyright.public java.lang.String getText()+
The copyright text for this album.
public java.lang.String getType()+
The type of copyright
: C = the copyright,P = the sound recording (performance) copyright.
public java.lang.String component1()+
The copyright text for this album.
public java.lang.String component2()+
The type of copyright
: C = the copyright,P = the sound recording (performance) copyright.
public SpotifyCopyright copy(java.lang.String text, + java.lang.String type)+
Describes an album's copyright
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyEndpoint
+Constructor and Description | +
---|
SpotifyEndpoint(SpotifyAPI api) |
+
Modifier and Type | +Method and Description | +
---|---|
SpotifyAPI |
+getApi() |
+
public SpotifyEndpoint(SpotifyAPI api)+
public SpotifyAPI getApi()+
public class SpotifyImage
+A Spotify image
Constructor and Description | +
---|
SpotifyImage(java.lang.Integer height,
+ java.lang.String url,
+ java.lang.Integer width)
+A Spotify image
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Integer |
+component1()
+The image height in pixels.
+ |
+
java.lang.String |
+component2()
+The source URL of the image.
+ |
+
java.lang.Integer |
+component3()
+The image width in pixels.
+ |
+
SpotifyImage |
+copy(java.lang.Integer height,
+ java.lang.String url,
+ java.lang.Integer width)
+A Spotify image
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.Integer |
+getHeight()
+The image height in pixels.
+ |
+
java.lang.String |
+getUrl()
+The source URL of the image.
+ |
+
java.lang.Integer |
+getWidth()
+The image width in pixels.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyImage(java.lang.Integer height, + java.lang.String url, + java.lang.Integer width)+
A Spotify image
height
- The image height in pixels. If unknown: null or not returned.url
- The source URL of the image.width
- The image width in pixels. If unknown: null or not returned.public java.lang.Integer getHeight()+
The image height in pixels.
If unknown: null or not returned.
public java.lang.String getUrl()+
The source URL of the image.
public java.lang.Integer getWidth()+
The image width in pixels.
If unknown: null or not returned.
public java.lang.Integer component1()+
The image height in pixels.
If unknown: null or not returned.
public java.lang.String component2()+
The source URL of the image.
public java.lang.Integer component3()+
The image width in pixels.
If unknown: null or not returned.
public SpotifyImage copy(java.lang.Integer height, + java.lang.String url, + java.lang.Integer width)+
A Spotify image
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyPublicUser
+Constructor and Description | +
---|
SpotifyPublicUser(java.lang.String displayName,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String type,
+ java.lang.String _uri,
+ UserURI uri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The name displayed on the user’s profile.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+component2()
+Known public external URLs for this user.
+ |
+
Followers |
+component3()
+Information about the followers of this user.
+ |
+
java.lang.String |
+component4()
+A link to the Web API endpoint for this user.
+ |
+
java.lang.String |
+component5()
+The Spotify user ID for this user.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component6()
+The user’s profile image.
+ |
+
java.lang.String |
+component7()
+The object type
+ |
+
UserURI |
+component9()
+The Spotify URI for this user.
+ |
+
SpotifyPublicUser |
+copy(java.lang.String displayName,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String type,
+ java.lang.String _uri,
+ UserURI uri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getDisplayName()
+The name displayed on the user’s profile.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known public external URLs for this user.
+ |
+
Followers |
+getFollowers()
+Information about the followers of this user.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint for this user.
+ |
+
java.lang.String |
+getId()
+The Spotify user ID for this user.
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The user’s profile image.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
UserURI |
+getUri()
+The Spotify URI for this user.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyPublicUser(java.lang.String displayName, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String type, + java.lang.String _uri, + UserURI uri)+
displayName
- The name displayed on the user’s profile. null if not available.externalUrls
- Known public external URLs for this user.followers
- Information about the followers of this user.href
- A link to the Web API endpoint for this user.id
- The Spotify user ID for this user.images
- The user’s profile image.type
- The object type: “user”uri
- The Spotify URI for this user.public java.lang.String getDisplayName()+
The name displayed on the user’s profile.
null if not available.
public java.util.Map<java.lang.String,java.lang.String> getExternalUrls()+
Known public external URLs for this user.
public Followers getFollowers()+
Information about the followers of this user.
public java.lang.String getHref()+
A link to the Web API endpoint for this user.
public java.lang.String getId()+
The Spotify user ID for this user.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The user’s profile image.
public java.lang.String getType()+
The object type
: “user”
public UserURI getUri()+
The Spotify URI for this user.
public java.lang.String component1()+
The name displayed on the user’s profile.
null if not available.
public java.util.Map<java.lang.String,java.lang.String> component2()+
Known public external URLs for this user.
public Followers component3()+
Information about the followers of this user.
public java.lang.String component4()+
A link to the Web API endpoint for this user.
public java.lang.String component5()+
The Spotify user ID for this user.
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component6()+
The user’s profile image.
public java.lang.String component7()+
The object type
: “user”
public UserURI component9()+
The Spotify URI for this user.
public SpotifyPublicUser copy(java.lang.String displayName, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String type, + java.lang.String _uri, + UserURI uri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class SpotifyUri
+Represents a Spotify URI, parsed from either a Spotify ID or taken from an endpoint.
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getId()
+representation of this uri as an id
+ |
+
java.lang.String |
+getUri()
+retrieve this URI as a string
+ |
+
public class SpotifyUriException
+Constructor and Description | +
---|
SpotifyUriException(java.lang.String message) |
+
public class SpotifyUrisKt
+public class SpotifyUserInformation
+Constructor and Description | +
---|
SpotifyUserInformation(java.lang.String birthdate,
+ java.lang.String country,
+ java.lang.String displayName,
+ java.lang.String email,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String product,
+ java.lang.String type,
+ java.lang.String _uri,
+ UserURI uri) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1()
+The user’s date-of-birth.
+ |
+
java.lang.String |
+component10()
+The user’s Spotify subscription level
+ |
+
java.lang.String |
+component11()
+The object type
+ |
+
UserURI |
+component13()
+The Spotify URI for the user.
+ |
+
java.lang.String |
+component2()
+The country of the user,
+ |
+
java.lang.String |
+component3()
+The name displayed on the user’s profile.
+ |
+
java.lang.String |
+component4()
+The user’s email address,
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+component5()
+Known external URLs for this user.
+ |
+
Followers |
+component6()
+Information about the followers of the user.
+ |
+
java.lang.String |
+component7()
+A link to the Web API endpoint for this user.
+ |
+
java.lang.String |
+component8()
+The Spotify user ID for the user
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+component9()
+The user’s profile image.
+ |
+
SpotifyUserInformation |
+copy(java.lang.String birthdate,
+ java.lang.String country,
+ java.lang.String displayName,
+ java.lang.String email,
+ java.util.HashMap<java.lang.String,java.lang.String> externalUrls,
+ Followers followers,
+ java.lang.String href,
+ java.lang.String id,
+ java.util.List<com.adamratzman.spotify.models.SpotifyImage> images,
+ java.lang.String product,
+ java.lang.String type,
+ java.lang.String _uri,
+ UserURI uri) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getBirthdate()
+The user’s date-of-birth.
+ |
+
java.lang.String |
+getCountry()
+The country of the user,
+ |
+
java.lang.String |
+getDisplayName()
+The name displayed on the user’s profile.
+ |
+
java.lang.String |
+getEmail()
+The user’s email address,
+ |
+
java.util.HashMap<java.lang.String,java.lang.String> |
+getExternalUrls()
+Known external URLs for this user.
+ |
+
Followers |
+getFollowers()
+Information about the followers of the user.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint for this user.
+ |
+
java.lang.String |
+getId()
+The Spotify user ID for the user
+ |
+
java.util.List<com.adamratzman.spotify.models.SpotifyImage> |
+getImages()
+The user’s profile image.
+ |
+
java.lang.String |
+getProduct()
+The user’s Spotify subscription level
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
UserURI |
+getUri()
+The Spotify URI for the user.
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public SpotifyUserInformation(java.lang.String birthdate, + java.lang.String country, + java.lang.String displayName, + java.lang.String email, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String product, + java.lang.String type, + java.lang.String _uri, + UserURI uri)+
birthdate
- The user’s date-of-birth. This field is only available when the current userhas granted access to the user-read-birthdate scope.country
- The country of the user, as set in the user’s account profile. An ISO 3166-1 alpha-2country code. This field is only available when the current user has granted access to the user-read-private scope.displayName
- The name displayed on the user’s profile. null if not available.email
- The user’s email address, as entered by the user when creating their account. Important! This emailaddress is unverified; there is no proof that it actually belongs to the user. This field is onlyavailable when the current user has granted access to the user-read-email scope.externalUrls
- Known external URLs for this user.followers
- Information about the followers of the user.href
- A link to the Web API endpoint for this user.id
- The Spotify user ID for the userimages
- The user’s profile image.product
- The user’s Spotify subscription level: “premium”, “free”, etc.(The subscription level “open” can be considered the same as “free”.) This field is only available when thecurrent user has granted access to the user-read-private scope.type
- The object type: “user”uri
- The Spotify URI for the user.public java.lang.String getBirthdate()+
The user’s date-of-birth.
This field is only available when the current userhas granted access to the user-read-birthdate scope.
public java.lang.String getCountry()+
The country of the user,
as set in the user’s account profile. An ISO 3166-1 alpha-2country code. This field is only available when the current user has granted access to the user-read-private scope.
public java.lang.String getDisplayName()+
The name displayed on the user’s profile.
null if not available.
public java.lang.String getEmail()+
The user’s email address,
as entered by the user when creating their account. Important! This emailaddress is unverified; there is no proof that it actually belongs to the user. This field is onlyavailable when the current user has granted access to the user-read-email scope.
public java.util.HashMap<java.lang.String,java.lang.String> getExternalUrls()+
Known external URLs for this user.
public Followers getFollowers()+
Information about the followers of the user.
public java.lang.String getHref()+
A link to the Web API endpoint for this user.
public java.lang.String getId()+
The Spotify user ID for the user
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> getImages()+
The user’s profile image.
public java.lang.String getProduct()+
The user’s Spotify subscription level
: “premium”, “free”, etc.(The subscription level “open” can be considered the same as “free”.) This field is only available when thecurrent user has granted access to the user-read-private scope.
public java.lang.String getType()+
The object type
: “user”
public UserURI getUri()+
The Spotify URI for the user.
public java.lang.String component1()+
The user’s date-of-birth.
This field is only available when the current userhas granted access to the user-read-birthdate scope.
public java.lang.String component2()+
The country of the user,
as set in the user’s account profile. An ISO 3166-1 alpha-2country code. This field is only available when the current user has granted access to the user-read-private scope.
public java.lang.String component3()+
The name displayed on the user’s profile.
null if not available.
public java.lang.String component4()+
The user’s email address,
as entered by the user when creating their account. Important! This emailaddress is unverified; there is no proof that it actually belongs to the user. This field is onlyavailable when the current user has granted access to the user-read-email scope.
public java.util.HashMap<java.lang.String,java.lang.String> component5()+
Known external URLs for this user.
public Followers component6()+
Information about the followers of the user.
public java.lang.String component7()+
A link to the Web API endpoint for this user.
public java.lang.String component8()+
The Spotify user ID for the user
public java.util.List<com.adamratzman.spotify.models.SpotifyImage> component9()+
The user’s profile image.
public java.lang.String component10()+
The user’s Spotify subscription level
: “premium”, “free”, etc.(The subscription level “open” can be considered the same as “free”.) This field is only available when thecurrent user has granted access to the user-read-private scope.
public java.lang.String component11()+
The object type
: “user”
public UserURI component13()+
The Spotify URI for the user.
public SpotifyUserInformation copy(java.lang.String birthdate, + java.lang.String country, + java.lang.String displayName, + java.lang.String email, + java.util.HashMap<java.lang.String,java.lang.String> externalUrls, + Followers followers, + java.lang.String href, + java.lang.String id, + java.util.List<com.adamratzman.spotify.models.SpotifyImage> images, + java.lang.String product, + java.lang.String type, + java.lang.String _uri, + UserURI uri)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TimeInterval
+Constructor and Description | +
---|
TimeInterval(float start,
+ float duration,
+ float confidence) |
+
Modifier and Type | +Method and Description | +
---|---|
float |
+component1()
+The starting point
+ |
+
float |
+component2()
+The duration
+ |
+
float |
+component3()
+The confidence,
+ |
+
TimeInterval |
+copy(float start,
+ float duration,
+ float confidence) |
+
boolean |
+equals(java.lang.Object p) |
+
float |
+getConfidence()
+The confidence,
+ |
+
float |
+getDuration()
+The duration
+ |
+
float |
+getStart()
+The starting point
+ |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public TimeInterval(float start, + float duration, + float confidence)+
start
- The starting point (in seconds) of the time interval.duration
- The duration (in seconds) of the time interval.confidence
- The confidence, from 0.0 to 1.0, of the reliability of the intervalpublic float getStart()+
The starting point
(in seconds) of the time interval.
public float getDuration()+
The duration
(in seconds) of the time interval.
public float getConfidence()+
The confidence,
from 0.0 to 1.0, of the reliability of the interval
public float component1()+
The starting point
(in seconds) of the time interval.
public float component2()+
The duration
(in seconds) of the time interval.
public float component3()+
The confidence,
from 0.0 to 1.0, of the reliability of the interval
public TimeInterval copy(float start, + float duration, + float confidence)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Token
+Represents a Spotify Token, retrieved through instantiating a new SpotifyAPI
Constructor and Description | +
---|
Token(java.lang.String accessToken,
+ java.lang.String tokenType,
+ int expiresIn,
+ java.lang.String refreshToken,
+ java.lang.String scopeString,
+ java.util.List<? extends com.adamratzman.spotify.main.SpotifyScope> scopes)
+Represents a Spotify Token, retrieved through instantiating a new SpotifyAPI
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
java.lang.String |
+component2() |
+
int |
+component3() |
+
java.lang.String |
+component4() |
+
java.util.List<com.adamratzman.spotify.main.SpotifyScope> |
+component6() |
+
Token |
+copy(java.lang.String accessToken,
+ java.lang.String tokenType,
+ int expiresIn,
+ java.lang.String refreshToken,
+ java.lang.String scopeString,
+ java.util.List<? extends com.adamratzman.spotify.main.SpotifyScope> scopes)
+Represents a Spotify Token, retrieved through instantiating a new SpotifyAPI
+ |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getAccessToken() |
+
int |
+getExpiresIn() |
+
java.lang.String |
+getRefreshToken() |
+
java.util.List<com.adamratzman.spotify.main.SpotifyScope> |
+getScopes() |
+
java.lang.String |
+getTokenType() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public Token(java.lang.String accessToken, + java.lang.String tokenType, + int expiresIn, + java.lang.String refreshToken, + java.lang.String scopeString, + java.util.List<? extends com.adamratzman.spotify.main.SpotifyScope> scopes)+
Represents a Spotify Token, retrieved through instantiating a new SpotifyAPI
public java.lang.String getAccessToken()+
public java.lang.String getTokenType()+
public int getExpiresIn()+
public java.lang.String getRefreshToken()+
public java.util.List<com.adamratzman.spotify.main.SpotifyScope> getScopes()+
public java.lang.String component1()+
public java.lang.String component2()+
public int component3()+
public java.lang.String component4()+
public java.util.List<com.adamratzman.spotify.main.SpotifyScope> component6()+
public Token copy(java.lang.String accessToken, + java.lang.String tokenType, + int expiresIn, + java.lang.String refreshToken, + java.lang.String scopeString, + java.util.List<? extends com.adamratzman.spotify.main.SpotifyScope> scopes)+
Represents a Spotify Token, retrieved through instantiating a new SpotifyAPI
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class Track
+extends RelinkingAvailableResponse
+Constructor and Description | +
---|
Track(SimpleAlbum album,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ boolean isPlayable,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ java.util.Map<java.lang.String,java.lang.String> externalIds,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ LinkedTrack linked_from,
+ java.lang.String name,
+ int popularity,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri,
+ java.lang.Boolean isLocal,
+ Restrictions restrictions) |
+
Modifier and Type | +Method and Description | +
---|---|
SimpleAlbum |
+component1()
+The album on which the track appears.
+ |
+
java.lang.String |
+component10()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+component11()
+The Spotify ID for the track.
+ |
+
java.lang.String |
+component13()
+The name of the track.
+ |
+
int |
+component14()
+The popularity of the track.
+ |
+
java.lang.String |
+component15()
+A link to a 30 second preview
+ |
+
int |
+component16()
+The number of the track.
+ |
+
java.lang.String |
+component17()
+The object type
+ |
+
TrackURI |
+component19()
+The Spotify URI for the track.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+component2()
+The artists who performed the track.
+ |
+
java.lang.Boolean |
+component20()
+Whether or not the track is from a local file.
+ |
+
Restrictions |
+component21()
+Part of the response when Track Relinking is applied,
+ |
+
java.util.List<java.lang.String> |
+component3()
+A list of the countries in which the track can be played,
+ |
+
boolean |
+component4()
+Part of the response when Track Relinking is applied.
+ |
+
int |
+component5()
+The disc number
+ |
+
int |
+component6()
+The track length in milliseconds.
+ |
+
boolean |
+component7()
+Whether or not the track has explicit lyrics
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+component8()
+External IDs for this track.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+component9()
+External URLs for this track.
+ |
+
Track |
+copy(SimpleAlbum album,
+ java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists,
+ java.util.List<java.lang.String> availableMarkets,
+ boolean isPlayable,
+ int discNumber,
+ int durationMs,
+ boolean explicit,
+ java.util.Map<java.lang.String,java.lang.String> externalIds,
+ java.util.Map<java.lang.String,java.lang.String> externalUrls,
+ java.lang.String href,
+ java.lang.String id,
+ LinkedTrack linked_from,
+ java.lang.String name,
+ int popularity,
+ java.lang.String previewUrl,
+ int trackNumber,
+ java.lang.String type,
+ java.lang.String _uri,
+ TrackURI uri,
+ java.lang.Boolean isLocal,
+ Restrictions restrictions) |
+
boolean |
+equals(java.lang.Object p) |
+
SimpleAlbum |
+getAlbum()
+The album on which the track appears.
+ |
+
java.util.List<com.adamratzman.spotify.models.SimpleArtist> |
+getArtists()
+The artists who performed the track.
+ |
+
java.util.List<java.lang.String> |
+getAvailableMarkets()
+A list of the countries in which the track can be played,
+ |
+
int |
+getDiscNumber()
+The disc number
+ |
+
int |
+getDurationMs()
+The track length in milliseconds.
+ |
+
boolean |
+getExplicit()
+Whether or not the track has explicit lyrics
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+getExternalIds()
+External IDs for this track.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+getExternalUrls()
+External URLs for this track.
+ |
+
java.lang.String |
+getHref()
+A link to the Web API endpoint providing full details of the track.
+ |
+
java.lang.String |
+getId()
+The Spotify ID for the track.
+ |
+
java.lang.String |
+getName()
+The name of the track.
+ |
+
int |
+getPopularity()
+The popularity of the track.
+ |
+
java.lang.String |
+getPreviewUrl()
+A link to a 30 second preview
+ |
+
Restrictions |
+getRestrictions()
+Part of the response when Track Relinking is applied,
+ |
+
int |
+getTrackNumber()
+The number of the track.
+ |
+
java.lang.String |
+getType()
+The object type
+ |
+
TrackURI |
+getUri()
+The Spotify URI for the track.
+ |
+
int |
+hashCode() |
+
java.lang.Boolean |
+isLocal()
+Whether or not the track is from a local file.
+ |
+
boolean |
+isPlayable()
+Part of the response when Track Relinking is applied.
+ |
+
java.lang.String |
+toString() |
+
getLinkedTrack, isRelinked
public Track(SimpleAlbum album, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + boolean isPlayable, + int discNumber, + int durationMs, + boolean explicit, + java.util.Map<java.lang.String,java.lang.String> externalIds, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + LinkedTrack linked_from, + java.lang.String name, + int popularity, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.String _uri, + TrackURI uri, + java.lang.Boolean isLocal, + Restrictions restrictions)+
album
- The album on which the track appears. The album object includes a link inhref to full information about the album.artists
- The artists who performed the track. Each artist object includes a link in hrefto more detailed information about the artist.availableMarkets
- A list of the countries in which the track can be played, identified by their ISO 3166-1 alpha-2 code.isPlayable
- Part of the response when Track Relinking is applied. If true , the track is playable in thegiven market. Otherwise false.discNumber
- The disc number (usually 1 unless the album consists of more than one disc).durationMs
- The track length in milliseconds.explicit
- Whether or not the track has explicit lyrics ( true = yes it does; false = no it does not OR unknown).externalIds
- External IDs for this track.externalUrls
- External URLs for this track.href
- A link to the Web API endpoint providing full details of the track.id
- The Spotify ID for the track.name
- The name of the track.popularity
- The popularity of the track. The value will be between 0 and 100, with 100 being the mostpopular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularityis calculated by algorithm and is based, in the most part, on the total number of plays the track has had and howrecent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularitythan songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album)are rated independently. Artist and album popularity is derived mathematically from track popularity. Note thatthe popularity value may lag actual popularity by a few days: the value is not updated in real time.previewUrl
- A link to a 30 second preview (MP3 format) of the track. Can be nulltrackNumber
- The number of the track. If an album has several discs, the track number is the number on the specified disc.type
- The object type: “track”.uri
- The Spotify URI for the track.isLocal
- Whether or not the track is from a local file.restrictions
- Part of the response when Track Relinking is applied, the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}public SimpleAlbum getAlbum()+
The album on which the track appears.
The album object includes a link inhref to full information about the album.
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> getArtists()+
The artists who performed the track.
Each artist object includes a link in hrefto more detailed information about the artist.
public java.util.List<java.lang.String> getAvailableMarkets()+
A list of the countries in which the track can be played,
identified by their ISO 3166-1 alpha-2 code.
public boolean isPlayable()+
Part of the response when Track Relinking is applied.
If true , the track is playable in thegiven market. Otherwise false.
public int getDiscNumber()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int getDurationMs()+
The track length in milliseconds.
public boolean getExplicit()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public java.util.Map<java.lang.String,java.lang.String> getExternalIds()+
External IDs for this track.
public java.util.Map<java.lang.String,java.lang.String> getExternalUrls()+
External URLs for this track.
public java.lang.String getHref()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String getId()+
The Spotify ID for the track.
public java.lang.String getName()+
The name of the track.
public int getPopularity()+
The popularity of the track.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularityis calculated by algorithm and is based, in the most part, on the total number of plays the track has had and howrecent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularitythan songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album)are rated independently. Artist and album popularity is derived mathematically from track popularity. Note thatthe popularity value may lag actual popularity by a few days: the value is not updated in real time.
public java.lang.String getPreviewUrl()+
A link to a 30 second preview
(MP3 format) of the track. Can be null
public int getTrackNumber()+
The number of the track.
If an album has several discs, the track number is the number on the specified disc.
public java.lang.String getType()+
The object type
: “track”.
public TrackURI getUri()+
The Spotify URI for the track.
public java.lang.Boolean isLocal()+
Whether or not the track is from a local file.
public Restrictions getRestrictions()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public SimpleAlbum component1()+
The album on which the track appears.
The album object includes a link inhref to full information about the album.
public java.util.List<com.adamratzman.spotify.models.SimpleArtist> component2()+
The artists who performed the track.
Each artist object includes a link in hrefto more detailed information about the artist.
public java.util.List<java.lang.String> component3()+
A list of the countries in which the track can be played,
identified by their ISO 3166-1 alpha-2 code.
public boolean component4()+
Part of the response when Track Relinking is applied.
If true , the track is playable in thegiven market. Otherwise false.
public int component5()+
The disc number
(usually 1 unless the album consists of more than one disc).
public int component6()+
The track length in milliseconds.
public boolean component7()+
Whether or not the track has explicit lyrics
( true = yes it does; false = no it does not OR unknown).
public java.util.Map<java.lang.String,java.lang.String> component8()+
External IDs for this track.
public java.util.Map<java.lang.String,java.lang.String> component9()+
External URLs for this track.
public java.lang.String component10()+
A link to the Web API endpoint providing full details of the track.
public java.lang.String component11()+
The Spotify ID for the track.
public java.lang.String component13()+
The name of the track.
public int component14()+
The popularity of the track.
The value will be between 0 and 100, with 100 being the mostpopular. The popularity of a track is a value between 0 and 100, with 100 being the most popular. The popularityis calculated by algorithm and is based, in the most part, on the total number of plays the track has had and howrecent those plays are. Generally speaking, songs that are being played a lot now will have a higher popularitythan songs that were played a lot in the past. Duplicate tracks (e.g. the same track from a single and an album)are rated independently. Artist and album popularity is derived mathematically from track popularity. Note thatthe popularity value may lag actual popularity by a few days: the value is not updated in real time.
public java.lang.String component15()+
A link to a 30 second preview
(MP3 format) of the track. Can be null
public int component16()+
The number of the track.
If an album has several discs, the track number is the number on the specified disc.
public java.lang.String component17()+
The object type
: “track”.
public TrackURI component19()+
The Spotify URI for the track.
public java.lang.Boolean component20()+
Whether or not the track is from a local file.
public Restrictions component21()+
Part of the response when Track Relinking is applied,
the original track is not available inthe given market, and Spotify did not have any tracks to relink it with. The track response will still containmetadata for the original track, and a restrictions object containing the reason why the track is not available:"restrictions" : {"reason" : "market"}
public Track copy(SimpleAlbum album, + java.util.List<com.adamratzman.spotify.models.SimpleArtist> artists, + java.util.List<java.lang.String> availableMarkets, + boolean isPlayable, + int discNumber, + int durationMs, + boolean explicit, + java.util.Map<java.lang.String,java.lang.String> externalIds, + java.util.Map<java.lang.String,java.lang.String> externalUrls, + java.lang.String href, + java.lang.String id, + LinkedTrack linked_from, + java.lang.String name, + int popularity, + java.lang.String previewUrl, + int trackNumber, + java.lang.String type, + java.lang.String _uri, + TrackURI uri, + java.lang.Boolean isLocal, + Restrictions restrictions)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TrackAnalysis
+Constructor and Description | +
---|
TrackAnalysis(int numSamples,
+ float duration,
+ java.lang.String sampleMd5,
+ int offsetSeconds,
+ int windowSeconds,
+ int analysisSampleRate,
+ int analysisChannels,
+ float endOfFadeIn,
+ float startOfFadeOut,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int timeSignature,
+ float timeSignatureConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ java.lang.String codestring,
+ float codeVersion,
+ java.lang.String echoprintstring,
+ float echoprintVersion,
+ java.lang.String synchstring,
+ float synchVersion,
+ java.lang.String rhythmstring,
+ float rhythmVersion) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+component1() |
+
float |
+component10() |
+
float |
+component11() |
+
float |
+component12() |
+
int |
+component13() |
+
float |
+component14() |
+
int |
+component15() |
+
float |
+component16() |
+
int |
+component17() |
+
float |
+component18() |
+
java.lang.String |
+component19() |
+
float |
+component2() |
+
float |
+component20() |
+
java.lang.String |
+component21() |
+
float |
+component22() |
+
java.lang.String |
+component23() |
+
float |
+component24() |
+
java.lang.String |
+component25() |
+
float |
+component26() |
+
java.lang.String |
+component3() |
+
int |
+component4() |
+
int |
+component5() |
+
int |
+component6() |
+
int |
+component7() |
+
float |
+component8() |
+
float |
+component9() |
+
TrackAnalysis |
+copy(int numSamples,
+ float duration,
+ java.lang.String sampleMd5,
+ int offsetSeconds,
+ int windowSeconds,
+ int analysisSampleRate,
+ int analysisChannels,
+ float endOfFadeIn,
+ float startOfFadeOut,
+ float loudness,
+ float tempo,
+ float tempoConfidence,
+ int timeSignature,
+ float timeSignatureConfidence,
+ int key,
+ float keyConfidence,
+ int mode,
+ float modeConfidence,
+ java.lang.String codestring,
+ float codeVersion,
+ java.lang.String echoprintstring,
+ float echoprintVersion,
+ java.lang.String synchstring,
+ float synchVersion,
+ java.lang.String rhythmstring,
+ float rhythmVersion) |
+
boolean |
+equals(java.lang.Object p) |
+
int |
+getAnalysisChannels() |
+
int |
+getAnalysisSampleRate() |
+
float |
+getCodeVersion() |
+
java.lang.String |
+getCodestring() |
+
float |
+getDuration() |
+
float |
+getEchoprintVersion() |
+
java.lang.String |
+getEchoprintstring() |
+
float |
+getEndOfFadeIn() |
+
int |
+getKey() |
+
float |
+getKeyConfidence() |
+
float |
+getLoudness() |
+
int |
+getMode() |
+
float |
+getModeConfidence() |
+
int |
+getNumSamples() |
+
int |
+getOffsetSeconds() |
+
float |
+getRhythmVersion() |
+
java.lang.String |
+getRhythmstring() |
+
java.lang.String |
+getSampleMd5() |
+
float |
+getStartOfFadeOut() |
+
float |
+getSynchVersion() |
+
java.lang.String |
+getSynchstring() |
+
float |
+getTempo() |
+
float |
+getTempoConfidence() |
+
int |
+getTimeSignature() |
+
float |
+getTimeSignatureConfidence() |
+
int |
+getWindowSeconds() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public TrackAnalysis(int numSamples, + float duration, + java.lang.String sampleMd5, + int offsetSeconds, + int windowSeconds, + int analysisSampleRate, + int analysisChannels, + float endOfFadeIn, + float startOfFadeOut, + float loudness, + float tempo, + float tempoConfidence, + int timeSignature, + float timeSignatureConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + java.lang.String codestring, + float codeVersion, + java.lang.String echoprintstring, + float echoprintVersion, + java.lang.String synchstring, + float synchVersion, + java.lang.String rhythmstring, + float rhythmVersion)+
public int getNumSamples()+
public float getDuration()+
public java.lang.String getSampleMd5()+
public int getOffsetSeconds()+
public int getWindowSeconds()+
public int getAnalysisSampleRate()+
public int getAnalysisChannels()+
public float getEndOfFadeIn()+
public float getStartOfFadeOut()+
public float getLoudness()+
public float getTempo()+
public float getTempoConfidence()+
public int getTimeSignature()+
public float getTimeSignatureConfidence()+
public int getKey()+
public float getKeyConfidence()+
public int getMode()+
public float getModeConfidence()+
public java.lang.String getCodestring()+
public float getCodeVersion()+
public java.lang.String getEchoprintstring()+
public float getEchoprintVersion()+
public java.lang.String getSynchstring()+
public float getSynchVersion()+
public java.lang.String getRhythmstring()+
public float getRhythmVersion()+
public int component1()+
public float component2()+
public java.lang.String component3()+
public int component4()+
public int component5()+
public int component6()+
public int component7()+
public float component8()+
public float component9()+
public float component10()+
public float component11()+
public float component12()+
public int component13()+
public float component14()+
public int component15()+
public float component16()+
public int component17()+
public float component18()+
public java.lang.String component19()+
public float component20()+
public java.lang.String component21()+
public float component22()+
public java.lang.String component23()+
public float component24()+
public java.lang.String component25()+
public float component26()+
public TrackAnalysis copy(int numSamples, + float duration, + java.lang.String sampleMd5, + int offsetSeconds, + int windowSeconds, + int analysisSampleRate, + int analysisChannels, + float endOfFadeIn, + float startOfFadeOut, + float loudness, + float tempo, + float tempoConfidence, + int timeSignature, + float timeSignatureConfidence, + int key, + float keyConfidence, + int mode, + float modeConfidence, + java.lang.String codestring, + float codeVersion, + java.lang.String echoprintstring, + float echoprintVersion, + java.lang.String synchstring, + float synchVersion, + java.lang.String rhythmstring, + float rhythmVersion)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
public class TrackURI
+extends SpotifyUri
+Represents a Spotify Track URI, parsed from either a Spotify ID or taken from an endpoint.
Constructor and Description | +
---|
TrackURI(java.lang.String input)
+Represents a Spotify Track URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
getId, getUri
public class UserURI
+extends SpotifyUri
+Represents a Spotify User URI, parsed from either a Spotify ID or taken from an endpoint.
Constructor and Description | +
---|
UserURI(java.lang.String input)
+Represents a Spotify User URI, parsed from either a Spotify ID or taken from an endpoint.
+ |
+
getId, getUri
public class VideoThumbnail
+Constructor and Description | +
---|
VideoThumbnail(java.lang.String url) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+component1() |
+
VideoThumbnail |
+copy(java.lang.String url) |
+
boolean |
+equals(java.lang.Object p) |
+
java.lang.String |
+getUrl() |
+
int |
+hashCode() |
+
java.lang.String |
+toString() |
+
public VideoThumbnail(java.lang.String url)+
public java.lang.String getUrl()+
public java.lang.String component1()+
public VideoThumbnail copy(java.lang.String url)+
public java.lang.String toString()+
public int hashCode()+
public boolean equals(java.lang.Object p)+
Class | +Description | +
---|---|
MiscUtilsKt | ++ |
Method and Description | +
---|
com.adamratzman.spotify.endpoints.public.BrowseAPI.getRecommendations(seedArtists, seedGenres, seedTracks, limit, market, targetAttributes, minAttributes, maxAttributes) | +
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+enum LibraryType
to the current user’s ‘Your Music’ library.enum LibraryType
to the current user’s ‘Your Music’ library.class Track
class Track
class SpotifyClientAPI
with an authorization code
+or build class SpotifyAPI
using a refresh tokenclass SpotifyAPI
instance with the given class SpotifyApiBuilder
parameters and the type -
+AuthorizationType.CLIENT for client authentication, or otherwise AuthorizationType.APPLICATIONclass SpotifyClientAPI
that has access to public endpoints, in addition to endpoints
+requiring scopes contained in the client authorization requestclass SpotifyAppAPI
that only has access to public endpoints and dataclass SpotifyAppAPI
using the provided credentialsclass SpotifyAppAPI
using the provided credentialsclass SpotifyAppAPI
that only has access to public endpoints and dataenum LibraryType
with id id is already saved in the current Spotify user’s ‘Your Music’ library.enum LibraryType
is already saved in the current Spotify user’s ‘Your Music’ library.class Track
class ErrorObject
PlaybackActions.getDisallows
are allowed.class Playlist
class Album
class Artist
class Playlist
class Playlist
SpotifyApiBuilder.automaticRefresh
, SpotifyApiBuilder.retryWhenRateLimited
, SpotifyApiBuilder.useCache
, SpotifyApiBuilder.enableLogger
, SpotifyApiBuilder.testTokenValidity
)class ErrorObject
class ErrorObject
class AbstractPagingObject
associated with this rest actionclass SpotifyApiBuilder
with the parameters provided to this api instanceclass SpotifyApiBuilder
with the parameters provided to this api instanceclass SpotifyApiBuilder
with the parameters provided to this api instanceclass SpotifyApiBuilderDsl
with the parameters provided to this api instanceclass SpotifyApiBuilderDsl
with the parameters provided to this api instanceclass SpotifyApiBuilderDsl
with the parameters provided to this api instanceclass DisallowablePlaybackAction
that have an explicit settingclass FollowingAPI
ClientPlaylistAPI.getPlaylists
class PagingObject
(blame Spotify)class PlaylistAPI
class UserAPI
class SpotifyAPI
class SpotifyAPI
PlaybackActions.getDisallows
are allowed.PlaybackActions.getDisallows
are allowed.class Playlist
class Playlist
enum LibraryType
(track or album) from the current user’s ‘Your Music’ library.enum LibraryType
(tracks or albums) from the current user’s ‘Your Music’ library.SearchAPI.search
for more informationSearchAPI.search
for more informationSearchAPI.search
for more informationSearchAPI.search
for more informationclass Album
class Album
class Artist
class Artist
class Playlist
class Playlist
class Playlist
class Playlist
class SpotifyAPI
class SpotifyClientAPI
and class SpotifyAppAPI
+implementations of the APIclass SimpleAlbum
into a full class Album
object with the given
+marketclass SimpleArtist
into a full class Artist
objectclass SimplePlaylist
into a full class Playlist
object with the given
+marketclass Track
object associated with this class LinkedTrack
with the given marketclass SimpleTrack
into a full class Track
object with the given
+market+ + diff --git a/docs/overview-summary.html b/docs/overview-summary.html new file mode 100644 index 000000000..adfe13060 --- /dev/null +++ b/docs/overview-summary.html @@ -0,0 +1,151 @@ + + + + + + +
Package | +Description | +
---|---|
com.adamratzman.spotify | ++ |
com.adamratzman.spotify.endpoints.client | ++ |
com.adamratzman.spotify.endpoints.public | ++ |
com.adamratzman.spotify.http | ++ |
com.adamratzman.spotify.models | ++ |