跳到內容

佈局

燈光資源與畫布和當前播放的特效進行互動。您可以在此查看當前特效、更改它、更改其預設,或迭代使用者所有已安裝的特效。

方法端點
GETscenes/current_layout
PATCHscenes/current_layout
GETscenes/layouts

獲取有關當前佈局的資訊。

Terminal window
curl http://localhost:16038/api/v1/scenes/current_layout
{
"api_version": "1.0",
"data": {
"current_layout": {
"id": "My Layout 1",
"type": "layout"
}
},
"id": 10,
"method": "/api/v1/scenes/current_layout",
"params": {},
"status": "ok"
}

設定當前活動的佈局。

Terminal window
curl -X PATCH -d "{\"layout\":\"My Layout 1\"}" http://localhost:16038/api/v1/scenes/current_layout
{
"api_version": "1.0",
"data": {
"current_layout": {
"id": "My Layout 1",
"type": "layout"
}
},
"id": 3,
"method": "/api/v1/scenes/current_layout",
"params": {
"body": {
"layout": "My Layout 1"
}
},
"status": "ok"
}

獲取使用者擁有的所有可用佈局列表。

Terminal window
curl http://localhost:16038/api/v1/scenes/layouts
{
"api_version": "1.0",
"data": {
"items": [
{
"id": "My Layout 1",
"type": "layout"
},
{
"id": "My Layout 2",
"type": "layout"
}
],
"type": "layouts"
},
"id": 11,
"method": "/api/v1/scenes/layouts",
"params": {},
"status": "ok"
}