Class Chapter
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.specification.Chapter
- All Implemented Interfaces:
Serializable, IModelObject
Retrieve information about
Chapter objects by building instances from this class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for buildingChapterinstances.static final classJsonUtil class for buildingChapterinstances.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 audiobook for which the chapter belongs.Get a URL to a 30 second preview (MP3 format) of the chapter.String[]Get a list of the countries in which the chapter can be played.Get the number of the chapter.Get a description of the chapter.Get the duration of the chapter in milliseconds.Check whether the chapter is explicit or not.Get the external URLs of the chapter.getHref()Get the full Spotify Web API endpoint URL of the chapter.Get a description of the chapter.getId()Get the Spotify ID of the chapter.Image[]Get the cover art for the chapter in various sizes, widest first.String[]Get a list of the languages used in the chapter.getName()Get the name of the chapter.Check whether the chapter is playable in the given market.Get the release date of the chapter.Get the precision of the release date.Get the content restriction applied, if any.Get the user's most recent position in the chapter.getType()Get the model object type.getUri()Get the Spotify URI of the chapter.inthashCode()toString()Returns a String representation of this model object in the style:
-
Method Details
-
getAudioPreviewUrl
Get a URL to a 30 second preview (MP3 format) of the chapter.nullif not available.- Returns:
- A URL to an audio preview.
-
getAvailableMarkets
Get a list of the countries in which the chapter can be played.- Returns:
- An array of ISO 3166-1 alpha-2 country codes.
-
getChapterNumber
Get the number of the chapter.- Returns:
- The number of the chapter.
-
getDescription
Get a description of the chapter. HTML tags are stripped away from this field.- Returns:
- The description of the chapter.
-
getHtmlDescription
Get a description of the chapter. This field may contain HTML tags.- Returns:
- The HTML description of the chapter.
-
getDurationMs
Get the duration of the chapter in milliseconds.- Returns:
- The chapter length in milliseconds.
-
getExplicit
Check whether the chapter is explicit or not.- Returns:
- Whether or not the chapter has explicit content.
-
getExternalUrls
Get the external URLs of the chapter.- Returns:
- An
ExternalUrlobject.
-
getHref
Get the full Spotify Web API endpoint URL of the chapter.- Returns:
- A link to the Web API endpoint providing full details of the chapter.
-
getId
-
getImages
-
getPlayable
Check whether the chapter is playable in the given market.- Returns:
- True if the chapter is playable in the given market. Otherwise false.
-
getLanguages
Get a list of the languages used in the chapter.- Returns:
- An array of ISO 639 language codes.
-
getName
-
getReleaseDate
Get the release date of the chapter.- Returns:
- The date the chapter was first released.
-
getReleaseDatePrecision
Get the precision of the release date.- Returns:
- The precision with which
release_datevalue is known.
-
getResumePoint
Get the user's most recent position in the chapter.- Returns:
- A
ResumePointobject.
-
getType
Get the model object type. In this case "episode".- Returns:
- A
ModelObjectType.
-
getUri
-
getRestrictions
Get the content restriction applied, if any.- Returns:
- A
ChapterRestrictionobject, ornull.
-
getAudiobook
Get the audiobook for which the chapter belongs.- Returns:
- A
AudiobookSimplifiedobject.
-
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
-