docs: update MkDocs configuration and documentation structure
- Refactor mkdocs.yml with new project name and simplified configuration - Update GitHub Actions workflow to use MkDocs Material deployment - Add new configuration files for Claude Desktop - Reorganize documentation navigation and structure - Update CSS and JavaScript references
This commit is contained in:
16
docs/api.md
16
docs/api.md
@@ -130,25 +130,25 @@ Basic rate limiting is implemented:
|
||||
async function controlDevice(entityId: string, command: string, params?: Record<string, unknown>) {
|
||||
try {
|
||||
const response = await fetch('/api/control', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${token}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
},
|
||||
body: JSON.stringify({
|
||||
entity_id: entityId,
|
||||
command,
|
||||
parameters: params
|
||||
})
|
||||
});
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const error = await response.json();
|
||||
throw new Error(error.message);
|
||||
}
|
||||
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
} catch (error) {
|
||||
console.error('Device control failed:', error);
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user