Device

data class Device(id: String?, isActive: Boolean, isPrivateSession: Boolean, isRestricted: Boolean, name: String, typeString: String, volumePercent: Int) : IdentifiableNullable

A device which is connected to the Spotify user

Parameters

id

The device ID. This may be null.

isActive

If this device is the currently active device.

isPrivateSession

If this device is currently in a private session.

isRestricted

Whether controlling this device is restricted. At present if this is “true” then no Web API commands will be accepted by this device.

name

The name of the device.

Constructors

Device
Link copied to clipboard
common
fun Device(id: String? = null, isActive: Boolean, isPrivateSession: Boolean, isRestricted: Boolean, name: String, typeString: String, volumePercent: Int)
The device ID.

Properties

api
Link copied to clipboard
common
lateinit var api: GenericSpotifyApi
The API client associated with the request
href
Link copied to clipboard
common
open override val href: String? = null
A link to the Spotify web api endpoint associated with this request
id
Link copied to clipboard
common
open override val id: String? = null
The device ID.
isActive
Link copied to clipboard
common
val isActive: Boolean
If this device is the currently active device.
isPrivateSession
Link copied to clipboard
common
val isPrivateSession: Boolean
If this device is currently in a private session.
isRestricted
Link copied to clipboard
common
val isRestricted: Boolean
Whether controlling this device is restricted.
name
Link copied to clipboard
common
val name: String
The name of the device.
type
Link copied to clipboard
common
val type: DeviceType
Device type, such as “Computer”, “Smartphone” or “Speaker”.
typeString
Link copied to clipboard
common
val typeString: String
volumePercent
Link copied to clipboard
common
val volumePercent: Int

Sources

common source
Link copied to clipboard