Skip to content

Commit

Permalink
Updated api/v2/device/audio endpoint documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarysk committed Jul 26, 2021
1 parent 94231df commit 36555e7
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions reference-docs/device-audio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,23 @@ Returns audio state such as volume.

Response
^^^^^^^^
======================= ============= ============================================================================
Property Type Description
======================= ============= ============================================================================
volume Integer Current volume [0..100]
======================= ============= ============================================================================
+-----------------------+--------------+-----------------------------------------------------------------------------+
| Property | Type | Description |
+=======================+==============+=============================================================================+
| ``volume`` | Integer | Current volume [0..100] |
+-----------------------+--------------+-----------------------------------------------------------------------------+
| ``volume_range`` | Object | *Optional*. Minimum and maximum volume values. |
| | | - ``min`` is the minimum volume value |
| | | - ``max`` is the maximum volume value |
+-----------------------+--------------+-----------------------------------------------------------------------------+
| ``volume_limit`` | Object | *Optional*. Volume value limits |
| | | - ``min`` stands for *lower* volume limit |
| | | - ``max`` stands for *upper* volume limit |
| | | | Device can limit its volume when it is powered from a computer in order |
| | | | to limit its power consumption and avoid unexpected power-offs. You will |
| | | | get error when try to set ``volume`` value that does not fall into |
| | | | this range. |
+-----------------------+--------------+-----------------------------------------------------------------------------+


Examples
Expand All @@ -41,7 +53,15 @@ Examples
Server: lighttpd/1.4.35

{
"volume" : 100
"volume" : 69,
"volume_range": {
"max": 100,
"min": 0
},
"volume_limit": {
"max": 69,
"min": 0
}
}

----
Expand All @@ -64,7 +84,7 @@ Body
::

{
"volume" : 100
"volume" : 69
}


Expand All @@ -81,7 +101,15 @@ Response
{
"success" : {
"data" : {
"volume" : 100
"volume" : 69,
"volume_range": {
"max": 100,
"min": 0
},
"volume_limit": {
"max": 69,
"min": 0
}
},
"path" : "/api/v2/device/audio"
}
Expand Down

0 comments on commit 36555e7

Please sign in to comment.