bosesoundtouchapi.models.preset
SoundTouch device Preset configuration object.
This class contains the attributes and sub-items that represent a single preset configuration of the device.
Initializes a new instance of the class.
Arguments:
- presetId (int): Preset identifier; valid values are 1 thru 6.
- createdOn (int): Date time (in epoch format) the preset was created; the current epoch time is used if the value is zero or None.
- updatedOn (int): Date time (in epoch format) the preset was last updated; the current epoch time is used if the value is zero or None.
- source (str): ContentItem node source value.
- typeValue (str): ContentItem node type value.
- location (str): ContentItem node location value.
- sourceAccount (str): ContentItem node sourceAccount value.
- isPresetable (bool): ContentItem node isPresetable value.
- name (str): ContentItem node itemName value.
- containerArt (str) ContentItem node containerArt value.
- root (Element): xmltree Element item to load arguments from.
If specified, then other passed arguments are ignored.
Date and time (in epoch format) of when the preset was created.
It seems that on some devices (ST-10) the SoundTouch WebServices API only returns this attribute for the LAST preset that was stored; the value will not be present for any other presets. Other devices (ST-300) return this attribute on all items.
Content item source type.
This value is defined at bosesoundtouchapi.soundtouchsources.SoundTouchSources
.
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.GetPresetList(resolveSourceTitles=True)' so that source titles can be displayed by user-interfaces.
Date and time (in epoch format) of when the preset was last updated.
It seems that on some devices (ST-10) the SoundTouch WebServices API only returns this attribute for the LAST preset that was stored; the value will not be present for any other presets. Other devices (ST-300) return this attribute on all items.
Returns a dictionary representation of the class.
Arguments:
- encoding (str): encode type (e.g. 'utf-8', 'unicode', etc).
Default is 'utf-8'.
Overridden.
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.