spotifywebapipython.models.tracksaved

@export
class TrackSaved:

Spotify Web API SavedTrack object.

TrackSaved(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 was saved.

Timestamps are returned in ISO 8601 format as Coordinated Universal Time (UTC) with a zero offset: YYYY-MM-DDTHH:MM:SSZ. If the time is imprecise (for example, the date/time of an album release), an additional field indicates the precision; see for example, release_date in an album object.

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.