bosesoundtouchapi.models.searchstationsongs

@export
class SearchStationSongs:

SoundTouch device SearchStationSongs configuration object.

This class contains the attributes and sub-items that represent the searchStation songs response configuration of the device.

SearchStationSongs(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.

The list of SearchResult items.

TotalItems: int

The total number of items in the list, as reported by the music service.

def ContainsArtist( self, source: str, value: str) -> bosesoundtouchapi.models.searchresult.SearchResult:

Searches the items collection for an item with the specified Source and Artist property values and returns the item if found; otherwise, None is returned.

Arguments:
  • source (str): Music Service Source value to search for.
  • value (str): Artist value to search for.
def ContainsName( self, source: str, value: str) -> bosesoundtouchapi.models.searchresult.SearchResult:

Searches the items collection for an item with the specified Source and Name property values and returns the item if found; otherwise, None is returned.

Arguments:
  • source (str): Music Service Source value to search for.
  • value (str): Name value to search for.
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, includeItems: bool = False) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeItems (bool): True to include all items in the list; otherwise False to only include the base list.