Class EpisodeSimplified
- java.lang.Object
-
- se.michaelthelin.spotify.model_objects.AbstractModelObject
-
- se.michaelthelin.spotify.model_objects.specification.EpisodeSimplified
-
- All Implemented Interfaces:
Serializable,IModelObject,ISearchModelObject
public class EpisodeSimplified extends AbstractModelObject implements ISearchModelObject
Retrieve information about simplified Episode objects by building instances from this class.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEpisodeSimplified.BuilderBuilder class for buildingEpisodeSimplifiedinstances.static classEpisodeSimplified.JsonUtilJsonUtil class for buildingEpisodeSimplifiedinstances.-
Nested classes/interfaces inherited from interface se.michaelthelin.spotify.model_objects.IModelObject
IModelObject.IJsonUtil<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EpisodeSimplified.Builderbuilder()Create a builder for building an instance of a model object.booleanequals(Object o)StringgetAudioPreviewUrl()Get a URL to a 30 second preview (MP3 format) of the episode.StringgetDescription()Get a description of the episode.IntegergetDurationMs()Get the duration of the episode in milliseconds.BooleangetExplicit()Check whether the episode is explicit or not.BooleangetExternallyHosted()Check whether the episode is hosted outside of Spotify's CDN.ExternalUrlgetExternalUrls()Get the external URLs of the episode.StringgetHref()Get the full Spotify Web API endpoint URL of the episode.StringgetId()Get the Spotify ID of the episode.Image[]getImages()Get the cover art for the episode in various sizes, widest first.String[]getLanguages()Get a list of the languages used in the episode, identified by their ISO 639 code.StringgetName()Get the name of the episode.BooleangetPlayable()Check whether the episode is playable in the given market.StringgetReleaseDate()Get the date the episode was first released, for example "1981-12-15".ReleaseDatePrecisiongetReleaseDatePrecision()Get the precision with which the release date is known.ResumePointgetResumePoint()Get the user’s most recent position in the episode.ModelObjectTypegetType()Get the model object type.StringgetUri()Get the Spotify URI of the episode.inthashCode()StringtoString()Returns a String representation of this model object in the style:
-
-
-
Method Detail
-
getAudioPreviewUrl
public String getAudioPreviewUrl()
Get a URL to a 30 second preview (MP3 format) of the episode.nullif not available.- Returns:
- A URL to an audio preview.
-
getDescription
public String getDescription()
Get a description of the episode.- Returns:
- The description of the episode.
-
getDurationMs
public Integer getDurationMs()
Get the duration of the episode in milliseconds.- Returns:
- The length of the episode in milliseconds.
-
getExplicit
public Boolean getExplicit()
Check whether the episode is explicit or not.- Returns:
- Whether or not the episode has explicit content (
true= yes it does;false= no it does not OR unknown).
-
getExternalUrls
public ExternalUrl getExternalUrls()
Get the external URLs of the episode.
Example: Spotify-URL- Returns:
- An
ExternalUrlobject.
-
getHref
public String getHref()
Get the full Spotify Web API endpoint URL of the episode.- Returns:
- A link to the Web API endpoint providing full details of the episode.
-
getId
public String getId()
Get the Spotify ID of the episode.- Returns:
- A Spotify episode ID.
-
getImages
public Image[] getImages()
Get the cover art for the episode in various sizes, widest first.- Returns:
- An array of
Imageobjects.
-
getExternallyHosted
public Boolean getExternallyHosted()
Check whether the episode is hosted outside of Spotify's CDN.- Returns:
- True if the episode is hosted outside of Spotify’s CDN.
-
getPlayable
public Boolean getPlayable()
Check whether the episode is playable in the given market.- Returns:
- True if the episode is playable in the given market. Otherwise false.
-
getLanguages
public String[] getLanguages()
Get a list of the languages used in the episode, identified by their ISO 639 code.- Returns:
- An array of ISO 3166-1 alpha-2 country codes.
-
getName
public String getName()
Get the name of the episode.- Returns:
- The name of the episode.
-
getReleaseDate
public String getReleaseDate()
Get the date the episode was first released, for example "1981-12-15". Depending on the precision, it might be shown as "1981" or "1981-12".- Returns:
- The release date of the episode.
-
getReleaseDatePrecision
public ReleaseDatePrecision getReleaseDatePrecision()
Get the precision with which the release date is known.- Returns:
- A
ReleaseDatePrecisionobject.
-
getResumePoint
public ResumePoint getResumePoint()
Get the user’s most recent position in the episode. Set if the supplied access token is a user token and has the scopeuser-read-playback-position.- Returns:
- A
ResumePointobject.
-
getType
public ModelObjectType getType()
Get the model object type. In this case "episode".- Returns:
- A
ModelObjectType.
-
getUri
public String getUri()
Get the Spotify URI of the episode.- Returns:
- Spotify episode URI.
-
toString
public String 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
public EpisodeSimplified.Builder 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.- Specified by:
builderin interfaceIModelObject- Returns:
- A builder object.
-
-