mirror of
https://github.com/onyx-and-iris/vmr-http.git
synced 2026-04-07 02:13:31 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a4175e690 | |||
| c24c05a3ff |
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "vmr-http"
|
name = "vmr-http"
|
||||||
version = "0.8.0"
|
version = "0.8.1"
|
||||||
description = "HTTP API for controlling Voicemeeter"
|
description = "HTTP API for controlling Voicemeeter"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
||||||
|
|||||||
@@ -15,42 +15,42 @@ router = APIRouter(tags=['command'])
|
|||||||
|
|
||||||
|
|
||||||
@router.post('/show')
|
@router.post('/show')
|
||||||
async def show_command(voicemeeter=Depends(get_voicemeeter_client)):
|
def show_command(voicemeeter=Depends(get_voicemeeter_client)):
|
||||||
"""Show the Voicemeeter application."""
|
"""Show the Voicemeeter application."""
|
||||||
voicemeeter.command.show()
|
voicemeeter.command.show()
|
||||||
return {'status': 'Voicemeeter shown'}
|
return {'status': 'Voicemeeter shown'}
|
||||||
|
|
||||||
|
|
||||||
@router.post('/hide')
|
@router.post('/hide')
|
||||||
async def hide_command(voicemeeter=Depends(get_voicemeeter_client)):
|
def hide_command(voicemeeter=Depends(get_voicemeeter_client)):
|
||||||
"""Hide the Voicemeeter application."""
|
"""Hide the Voicemeeter application."""
|
||||||
voicemeeter.command.hide()
|
voicemeeter.command.hide()
|
||||||
return {'status': 'Voicemeeter hidden'}
|
return {'status': 'Voicemeeter hidden'}
|
||||||
|
|
||||||
|
|
||||||
@router.post('/shutdown')
|
@router.post('/shutdown')
|
||||||
async def shutdown_command(voicemeeter=Depends(get_voicemeeter_client)):
|
def shutdown_command(voicemeeter=Depends(get_voicemeeter_client)):
|
||||||
"""Shutdown the Voicemeeter application."""
|
"""Shutdown the Voicemeeter application."""
|
||||||
voicemeeter.command.shutdown()
|
voicemeeter.command.shutdown()
|
||||||
return {'status': 'Voicemeeter shutdown'}
|
return {'status': 'Voicemeeter shutdown'}
|
||||||
|
|
||||||
|
|
||||||
@router.post('/restart')
|
@router.post('/restart')
|
||||||
async def restart_command(voicemeeter=Depends(get_voicemeeter_client)):
|
def restart_command(voicemeeter=Depends(get_voicemeeter_client)):
|
||||||
"""Restart the Voicemeeter application."""
|
"""Restart the Voicemeeter application."""
|
||||||
voicemeeter.command.restart()
|
voicemeeter.command.restart()
|
||||||
return {'status': 'Voicemeeter restarted'}
|
return {'status': 'Voicemeeter restarted'}
|
||||||
|
|
||||||
|
|
||||||
@router.post('/lock')
|
@router.post('/lock')
|
||||||
async def lock_command(voicemeeter=Depends(get_voicemeeter_client)):
|
def lock_command(voicemeeter=Depends(get_voicemeeter_client)):
|
||||||
"""Lock the Voicemeeter application."""
|
"""Lock the Voicemeeter application."""
|
||||||
voicemeeter.command.lock = True
|
voicemeeter.command.lock = True
|
||||||
return {'status': 'Voicemeeter locked'}
|
return {'status': 'Voicemeeter locked'}
|
||||||
|
|
||||||
|
|
||||||
@router.post('/unlock')
|
@router.post('/unlock')
|
||||||
async def unlock_command(voicemeeter=Depends(get_voicemeeter_client)):
|
def unlock_command(voicemeeter=Depends(get_voicemeeter_client)):
|
||||||
"""Unlock the Voicemeeter application."""
|
"""Unlock the Voicemeeter application."""
|
||||||
voicemeeter.command.lock = False
|
voicemeeter.command.lock = False
|
||||||
return {'status': 'Voicemeeter unlocked'}
|
return {'status': 'Voicemeeter unlocked'}
|
||||||
|
|||||||
Reference in New Issue
Block a user