setVolume

suspend fun setVolume(volumePercent: Int, deviceId: String? = null): HttpStatusCode(source)

Set the volume of the user's player

Return

HttpStatusCode.NoContent if the request succeeded, HttpStatusCode.BadRequest if the volume wasn't between 0 and 100, HttpStatusCode.NotFound if the device was not found, HttpStatusCode.Forbidden if the user is non-premium

Parameters

volumePercent

The volume percentage (must be a value from 0 to 100 inclusive.)

deviceId

The device ID, if not provided, the user's current active device is targeted