spotifywebapipython.models.chaptersimplified

@export
class ChapterSimplified:

Spotify Web API Simplified Chapter object.

ChapterSimplified(root: dict = None)

Initializes a new instance of the class.

Arguments:
  • root (dict): Spotify Web API JSON response in dictionary format, used to load object attributes; otherwise, None to not load attributes.
AudioPreviewUrl: str

A URL to a 30 second preview (MP3 format) of the chapter, or null if not available.

Important policy note: Spotify Audio preview clips can not be a standalone service.

Example: https://p.scdn.co/mp3-preview/2f37da1d4221f40b9d1a98cd191f4d6f1646ad17

AvailableMarkets: list[str]

A list of the countries in which the chapter can be played, identified by their ISO 3166-1 alpha-2 code.

Example: ["CA","BR","IT"]

ChapterNumber: int

The number of the chapter

Example: 1

Description: str

A description of the chapter.

HTML tags are stripped away from this field, use html_description field in case HTML tags are needed.

DurationMS: int

The chapter length in milliseconds.

Example: 1686230

Explicit: bool

Whether or not the chapter has explicit content (true = yes it does; false = no it does not OR unknown).

Known external URLs for the album.

Href: str

A link to the Web API endpoint providing full details of the chapter.

Example: https://api.spotify.com/v1/chapters/0D5wENdkdwbqlrHoaJ9g29

HtmlDescription: str

A description of the chapter. This field may contain HTML tags.

Id: str

The Spotify ID for the chapter.

Example: 0D5wENdkdwbqlrHoaJ9g29

The cover art for the chapter in various sizes, widest first.

ImageUrl: str

Gets the first image url in the Images list, if images are defined; otherwise, null.

IsPlayable: bool

True if the chapter is playable in the given market. Otherwise false.

Languages: list[str]

A list of the languages used in the chapter, identified by their ISO 639-1 code.

Example: [fr,en]

Name: str

The name of the chapter.

ReleaseDate: str

The date the chapter was first released.

Example: 1981-12
Depending on the precision, it might be shown as "1981" or "1981-12".

ReleaseDatePrecision: str

The precision with which release_date value is known.
Allowed values: year, month, day.

Example: year

Included in the response when a content restriction is applied.

The user's most recent position in the chapter.
Set if the supplied access token is a user token and has the scope 'user-read-playback-position'.

Type: str

The object type: chapter.

Uri: str

The Spotify URI for the chapter.

Example: spotify:chapter:0D5wENdkdwbqlrHoaJ9g29

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self, includeTitle: bool = True) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeTitle (str): True to include the class name title prefix.