Class User
java.lang.Object
com.wrapper.spotify.model_objects.AbstractModelObject
com.wrapper.spotify.model_objects.specification.User
- All Implemented Interfaces:
IModelObject
public class User extends AbstractModelObject
Retrieve information about
User objects by building instances from this class.
Note: Many methods of this model object may return
Note: Many methods of this model object may return
null, depending on the scopes specified in the
authentication request.- See Also:
- Spotify: Using Scopes
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUser.BuilderBuilder class for buildingUserinstances.static classUser.JsonUtilJsonUtil class for buildingUserinstances.Nested classes/interfaces inherited from interface com.wrapper.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and Type Method Description User.Builderbuilder()Create a builder for building an instance of a model object.StringgetBirthdate()Get the users birthdate.com.neovisionaries.i18n.CountryCodegetCountry()Get the country code of the users set home country.StringgetDisplayName()Get the users display name if available.StringgetEmail()Get the users email address.ExternalUrlgetExternalUrls()Get the external URLs of the user.FollowersgetFollowers()Get information about the followers of the user.StringgetHref()Get the Spotify Web API endpoint URL of the user.StringgetId()Get the Spotify ID of the user.Image[]getImages()Get the profile image of the user in different sizes.ProductTypegetProduct()Get the product type of the users account.ModelObjectTypegetType()Get the model object type.StringgetUri()Get the Spotify URI of the user.
-
Method Details
-
getBirthdate
Get the users birthdate.
Note: This field is only available when the current user has granted access to theuser-read-birthdatescope.- Returns:
- The user's date-of-birth.
- See Also:
- Spotify: Using Scopes
-
getCountry
public com.neovisionaries.i18n.CountryCode getCountry()Get the country code of the users set home country.
Note: This field is only available when the current user has granted access to theuser-read-privatescope.- Returns:
- An ISO 3166-1 alpha-2 country code.
- See Also:
- Spotify: Using Scopes
-
getDisplayName
Get the users display name if available.
If the display name is not available,nullwill be returned.- Returns:
- The name displayed on the user's profile.
nullif not available.
-
getEmail
Get the users email address.
Important! This email address is unverified; there is no proof that it actually belongs to the user.
Note: This field is only available when the current user has granted access to theuser-read-emailscope.- Returns:
- The user's email address, as entered by the user when creating their account.
- See Also:
- Spotify: Using Scopes
-
getExternalUrls
Get the external URLs of the user.
Example: Spotify-URL.- Returns:
- Known external URLs for this user.
-
getFollowers
Get information about the followers of the user.
Example: Follower count.- Returns:
- Information about the followers of the user.
-
getHref
Get the Spotify Web API endpoint URL of the user.- Returns:
- A link to the Spotify Web API endpoint for this user.
-
getId
Get the Spotify ID of the user.- Returns:
- The Spotify user ID for the user.
-
getImages
Get the profile image of the user in different sizes.- Returns:
- The user's profile image.
-
getProduct
Get the product type of the users account.
Product type refers to premium account, free account, etc.
Note: This field is only available when the current user has granted access to theuser-read-privatescope.- Returns:
- The user's Spotify subscription level: "premium", "free", etc.
- See Also:
- Spotify: Using Scopes
-
getType
Get the model object type. In this case "user".- Returns:
- The object type: "user"
-
getUri
Get the Spotify URI of the user.- Returns:
- The Spotify URI for the user.
-
builder
Description copied from interface:IModelObjectCreate a builder for building an instance of a model object.
The type of the builder and its methods depend on its corresponding implementation.- Returns:
- A builder object.
-