spotifywebapipython.models.playlisttrack

@export
class PlaylistTrack:

Spotify Web API PlaylistTrack object.

PlaylistTrack(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.
AddedAt: str

The date and time the track or episode was added.

Note: some very old playlists may return null in this field.

The Spotify user who added the track or episode.

Note: some very old playlists may return null in this field.

ImageUrl: str

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

IsLocal: bool

Whether this track or episode is a local file (True) or not False).

Information about the track.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self, includeItems: bool = False) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeItems (bool): True to include the Items collection of objects; otherwise, False to only return base properties.