bosesoundtouchapi.models.recent

@export
class Recent:

SoundTouch device Recent configuration object.

This class contains the attributes and sub-items that represent a single recent configuration of the device.

Recent(root: xml.etree.ElementTree.Element = None)

Initializes a new instance of the class.

Arguments:
  • root (Element): xmltree Element item to load arguments from.
    If specified, then other passed arguments are ignored.

ContentItem value.

ContainerArt: str

Content item's container art url.

CreatedOn: int

Date and time (in epoch format) of when the recent was created.

DeviceId: str

Device identifier the configuration information was obtained from.

IsPresetable: str

Returns True if the content item can be saved as a Preset; otherwise, False.

Location: str

If present, the content item's direct link to the media.

Name: str

Content item's name.

RecentId: int

The recent identifier.

Source: str

Content item source type.

This value is defined at bosesoundtouchapi.soundtouchsources.SoundTouchSources.

SourceAccount: str

The account associated with the Source.

SourceTitle: str

The source title of media content (e.g. "Tunein", "Airplay", "NAS Music Server", etc).

This property is not part of the returned xml of the configuration, but is set after a call to `SoundTouchClient.GetRecentList(resolveSourceTitles=True)' so that source titles can be displayed by user-interfaces.

TypeValue: str

Specifies the type of the content item.

def ToDictionary(self, encoding: str = 'utf-8') -> dict:

Returns a dictionary representation of the class.

Arguments:
  • encoding (str): encode type (e.g. 'utf-8', 'unicode', etc).
    Default is 'utf-8'.
def ToElement(self, isRequestBody: bool = False) -> xml.etree.ElementTree.Element:

Returns an xmltree Element node representation of the class.

Arguments:
  • isRequestBody (bool): True if the element should only return attributes needed for a POST request body; otherwise, False to return all attributes.
def ToString(self) -> str:

Returns a displayable string representation of the class.

def ToXmlString(self, encoding: str = 'utf-8') -> str:

Returns an xml string representation of the class.

Arguments:
  • encoding (str): encode type (e.g. 'utf-8', 'unicode', etc).
    Default is 'utf-8'.