spotifywebapipython.models.device
Spotify Web API Device object.
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.
The device ID.
This ID is unique and persistent to some extent. However, this is not guaranteed and any cached device_id should periodically be cleared out and refetched as necessary.
Whether controlling this device is restricted.
At present if this is "true" then no Web API commands will be accepted by this device.
A human-readable name for the device.
Some devices have a name that the user can configure (e.g. "Loudest speaker") and some devices have a generic name associated with the manufacturer or device model.
Example: Kitchen speaker
Returns a string that can be used in a selection list in the form of "Name (Id)".
This is a helper property, and not part of the Spotify Web API interface.
Returns the Id portion of a SelectItemNameAndId
property value.
Arguments:
- value (str): A
SelectItemNameAndId
property value.
Returns:
The Id portion of a
SelectItemNameAndId
property value, or None if the Id potion could not be determined.
Returns the Name portion of a SelectItemNameAndId
property value.
Arguments:
- value (str): A
SelectItemNameAndId
property value.
Returns:
The Name portion of a
SelectItemNameAndId
property value, or None if the Name potion could not be determined.