spotifywebapipython.zeroconfapi.zeroconfresponse

@export
class ZeroconfResponse:

Spotify Zeroconf API basic response object.

ZeroconfResponse(root: dict = None)

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.
HasInteractionIDs: bool

Returns True if interactionIDs entries defined; otherwise, False.

InteractionIDs: list[str]

In a Google Cast Spotify Connect session, the interactionId (sometimes seen as interactionIDs, interaction_id, or similar in logs or APIs) is a unique identifier assigned to track and correlate events or commands related to a specific user interaction or session lifecycle (e.g. play, pause, volume change, add user, etc).

Spotify client apps (e.g. mobile app, desktop app, or embedded SDK like Librespot) are responsible for generating and attaching the interactionId. This is usually done just before the getInfo message call, so that it can be included in the getInfo payload.

It is usually a UUID (Universally Unique Identifier) or similarly unique string.

ResponseSource: str

Response source string (e.g. "", "eSDK", etc).

SpotifyError: int

The last error code returned by a Spotify API call or the SpCallbackError() callback (e.g. 0, -119, etc).

Status: int

A code indicating the result of the operation (e.g. 101, 402, etc).

StatusString: str

The string describing the status code; some examples are:

  • "OK" (kSpErrorOk)
  • "ERROR-SPOTIFY-ERROR"
  • "ERROR-LOGIN-FAILED" (kSpErrorZeroConfLoginFailed )
def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self, includeTitle: bool = True) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeTitle (str): True to include the class name title prefix.