Class User
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.User
- All Implemented Interfaces:
Serializable, IModelObject
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for buildingUserinstances.static final classJsonUtil class for buildingUserinstances.Nested classes/interfaces inherited from interface IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder for building an instance of a model object.booleanGet the alphanumeric string identifying the account, which is not publicly visible.Get the users birthdate.Get the country of the user, as set in the user's account profile.Get the users display name if available.getEmail()Get the user's email address, as entered by the user when creating their account.Get the user's explicit content settings.Get the external URLs of the user.Get information about the followers of the user.getHref()Get the Spotify Web API endpoint URL of the user.getId()Get the Spotify ID of the user.Image[]Get the profile image of the user in different sizes.Get the user's Spotify subscription level.getType()Get the model object type.getUri()Get the Spotify URI of the user.inthashCode()toString()Returns a String representation of this model object in the style:
-
Method Details
-
getAccountId
Get the alphanumeric string identifying the account, which is not publicly visible.- Returns:
- An alphanumeric string identifying the account.
-
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:
-
getCountry
Get the country of the user, as set in the user's account profile.
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:
-
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 user's email address, as entered by the user when creating their account.
Note: This field is only available when the current user has granted access to theuser-read-emailscope, and the email address is not necessarily verified.- Returns:
- The user's email address.
- See Also:
-
getExplicitContent
Get the user's explicit content settings.
Note: This field is only available when the current user has granted access to theuser-read-privatescope.- Returns:
- A
ExplicitContentSettingsobject. - See Also:
-
getExternalUrls
Get the external URLs of the user.
Example: Spotify-URL.- Returns:
- Known external URLs for this user.
-
getFollowers
-
getHref
Get the Spotify Web API endpoint URL of the user.- Returns:
- A link to the Spotify Web API endpoint for this user.
-
getId
-
getImages
Get the profile image of the user in different sizes.- Returns:
- The user's profile image.
-
getProduct
Get the user's Spotify subscription level.
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", or"open". - See Also:
-
getType
Get the model object type. In this case "user".- Returns:
- The object type: "user"
-
getUri
-
toString
Description copied from class:AbstractModelObjectReturns a String representation of this model object in the style:ModelObject(attr1=value1, attr2=value2, ...)- Specified by:
toStringin classAbstractModelObject
-
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.
-
equals
-
hashCode
-