Bỏ qua để đến nội dung

Layouts

Các tài nguyên Lighting giao tiếp với canvas và các hiệu ứng đang phát hiện tại. Tại đây bạn có thể xem hiệu ứng hiện tại, thay đổi nó, thay đổi preset của nó hoặc lặp qua tất cả các hiệu ứng được cài đặt của người dùng.

Phương thứcEndpoint
GETscenes/current_layout
PATCHscenes/current_layout
GETscenes/layouts

Lấy thông tin về layout hiện tại.

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"
}

Đặt layout hiện đang hoạt động.

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"
}

Trả về danh sách tất cả các layout có sẵn của người dùng.

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"
}