Skip to content

Playlist🔗

Definition🔗

class Playlist:
    # Unique playlist identifier. Generated on creation, either by the
    # creator of the playlist of by the application.
    uid: str
    # Name of the playlist.
    name: str
    # Interval sets the time between switching views in a playlist.
    # FIXME: Is this based on a standardized format or what options are available? Can datemath be used?
    interval: str
    # The ordered list of items that the playlist will iterate over.
    # FIXME! This should not be optional, but changing it makes the godegen awkward
    items: typing.Optional[list[playlist.PlaylistItem]]

Methods🔗

to_json🔗

Converts this object into a representation that can easily be encoded to JSON.

def to_json() -> dict[str, object]

from_json🔗

Builds this object from a JSON-decoded dict.

@classmethod
def from_json(data: dict[str, typing.Any]) -> typing.Self

See also🔗