API doc changes
This commit is contained in:
parent
e859adac86
commit
4f15eee72b
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
export let settings = {};
|
export let settings = {};
|
||||||
export let customText: string;
|
export let customText: string;
|
||||||
export let ledColor: string = '#FFCC00';
|
|
||||||
export let status: Writable<{ leds: [] }>;
|
export let status: Writable<{ leds: [] }>;
|
||||||
let ledStatus = [];
|
let ledStatus = [];
|
||||||
let keepLedsSameColor = false;
|
let keepLedsSameColor = false;
|
||||||
@ -41,8 +40,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const setLEDcolor = () => {
|
const setLEDcolor = () => {
|
||||||
console.log(`${PUBLIC_BASE_URL}/api/lights/${ledColor}`);
|
fetch(`${PUBLIC_BASE_URL}/api/lights/set`, {
|
||||||
fetch(`${PUBLIC_BASE_URL}/api/lights`, {
|
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": null
|
"$ref": "#/components/schemas/ArrayOfLeds"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -202,7 +202,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
"/lights/set": {
|
||||||
"patch": {
|
"patch": {
|
||||||
"tags": ["lights"],
|
"tags": ["lights"],
|
||||||
"summary": "Set individual LEDs",
|
"summary": "Set individual LEDs",
|
||||||
@ -225,7 +227,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/lights/{color}": {
|
"/lights/color/{color}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": ["lights"],
|
"tags": ["lights"],
|
||||||
"summary": "Turn on LEDs with specific color",
|
"summary": "Turn on LEDs with specific color",
|
||||||
|
@ -33,7 +33,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: #/components/schemas/ArrayOfLeds
|
$ref: '#/components/schemas/ArrayOfLeds'
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- system
|
- system
|
||||||
@ -139,6 +139,7 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ArrayOfLeds'
|
$ref: '#/components/schemas/ArrayOfLeds'
|
||||||
|
/lights/set:
|
||||||
patch:
|
patch:
|
||||||
tags:
|
tags:
|
||||||
- lights
|
- lights
|
||||||
@ -153,7 +154,7 @@ paths:
|
|||||||
description: succesful operation
|
description: succesful operation
|
||||||
'400':
|
'400':
|
||||||
description: invalid colors or wrong amount of LEDs
|
description: invalid colors or wrong amount of LEDs
|
||||||
/lights/{color}:
|
/lights/color/{color}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- lights
|
- lights
|
||||||
|
Loading…
Reference in New Issue
Block a user