spotifywebapipython.models.playerqueueinfo

@export
class PlayerQueueInfo:

Spotify Web API PlayerQueueInfo object.

Information about the user's current playback queue.

PlayerQueueInfo(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.
CurrentlyPlaying: object

The currently playing track or episode; can be null.

CurrentlyPlayingType: str

The object type of the currently playing item, or null if nothing is playing.

If not null, it can be one of track, episode, ad or unknown.

DateLastRefreshed: float

Date and time items were was last refreshed, in unix epoch format (e.g. 1669123919.331225). A value of zero indicates the date was unknown.

Note that this attribute does not exist in the Spotify Web API; it was added here for convenience.

Queue: list[object]

The tracks or episodes in the queue. Can be empty.

Will be one of the following: Track or Episode

QueueCount: int

The number of items in the Queue array.

Summary: str

Returns a summary of what is playing.

def ContainsUri(self, uri: str) -> bool:

Checks the Queue collection to see if an item already exists with the specified Uri value.

Returns True if the specified Uri value exists in the collection; otherwise, False.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self) -> str:

Returns a displayable string representation of the class.