[README] Add documentation for expression parameter in queue/items/add

This commit is contained in:
chme 2018-12-29 10:03:26 +01:00
parent 2ead24a2f7
commit e3b0442fc7

View File

@ -583,8 +583,11 @@ POST /api/queue/items/add
| Parameter | Value |
| --------------- | ----------------------------------------------------------- |
| uris | Comma seperated list of resource identifiers (`track`, `playlist`, `artist` or `album` object `uri`) |
| expression | A smart playlist query expression identifying the tracks that will be added to the queue. |
| position | *(Optional)* If a position is given, new items are inserted starting from this position into the queue. |
Either the `uris` or the `expression` parameter must be set. If both are set the `uris` parameter takes presedence and the `expression` parameter will be ignored.
**Response**
On success returns the HTTP `200 OK` success status response code.
@ -596,6 +599,8 @@ On success returns the HTTP `200 OK` success status response code.
**Example**
Add new items by uri:
```shell
curl -X POST "http://localhost:3689/api/queue/items/add?uris=library:playlist:68,library:artist:2932599850102967727"
```
@ -606,6 +611,18 @@ curl -X POST "http://localhost:3689/api/queue/items/add?uris=library:playlist:68
}
```
Add new items by query language:
```shell
curl -X POST "http://localhost:3689/api/queue/items/add?expression=media_kind+is+music"
```
```json
{
"count": 42
}
```
### Moving a queue item