佈局
燈光資源與畫布和當前播放的特效進行互動。您可以在此查看當前特效、更改它、更改其預設,或迭代使用者所有已安裝的特效。
| 方法 | 端點 |
|---|---|
| GET | scenes/current_layout |
| PATCH | scenes/current_layout |
| GET | scenes/layouts |
獲取當前佈局
Section titled “獲取當前佈局”獲取有關當前佈局的資訊。
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"}設定當前佈局
Section titled “設定當前佈局”設定當前活動的佈局。
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"}獲取所有佈局
Section titled “獲取所有佈局”獲取使用者擁有的所有可用佈局列表。
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"}