docs(api): improve api documentation (#3343)

This commit is contained in:
ReenigneArcher 2024-10-30 16:34:18 -04:00 committed by GitHub
commit ec0cdcf0fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 213 additions and 10 deletions

View file

@ -52,6 +52,7 @@ INPUT = ../README.md \
app_examples.md \
guides.md \
performance_tuning.md \
api.md \
troubleshooting.md \
building.md \
contributing.md \

64
docs/api.md Normal file
View file

@ -0,0 +1,64 @@
# API
Sunshine has a RESTful API which can be used to interact with the service.
Unless otherwise specified, authentication is required for all API calls. You can authenticate using
basic authentication with the admin username and password.
## GET /api/apps
@copydoc confighttp::getApps()
## GET /api/logs
@copydoc confighttp::getLogs()
## POST /api/apps
@copydoc confighttp::saveApp()
## DELETE /api/apps{index}
@copydoc confighttp::deleteApp()
## POST /api/covers/upload
@copydoc confighttp::uploadCover()
## GET /api/config
@copydoc confighttp::getConfig()
## GET /api/configLocale
@copydoc confighttp::getLocale()
## POST /api/config
@copydoc confighttp::saveConfig()
## POST /api/restart
@copydoc confighttp::restart()
## POST /api/password
@copydoc confighttp::savePassword()
## POST /api/pin
@copydoc confighttp::savePin()
## POST /api/clients/unpair-all
@copydoc confighttp::unpairAll()
## POST /api/clients/unpair
@copydoc confighttp::unpair()
## GET /api/clients/list
@copydoc confighttp::listClients()
## GET /api/apps/close
@copydoc confighttp::closeApp()
<div class="section_buttons">
| Previous | Next |
|:--------------------------------------------|--------------------------------------:|
| [Performance Tuning](performance_tuning.md) | [Troubleshooting](troubleshooting.md) |
</div>
<details style="display: none;">
<summary></summary>
[TOC]
</details>

View file

@ -13,9 +13,9 @@ Enabling *Fast Sync* in Nvidia settings may help reduce latency.
<div class="section_buttons">
| Previous | Next |
|:--------------------|--------------------------------------:|
| [Guides](guides.md) | [Troubleshooting](troubleshooting.md) |
| Previous | Next |
|:--------------------|--------------:|
| [Guides](guides.md) | [API](api.md) |
</div>

View file

@ -200,9 +200,9 @@ permissions on the disk.
<div class="section_buttons">
| Previous | Next |
|:--------------------------------------------|------------------------:|
| [Performance Tuning](performance_tuning.md) | [Building](building.md) |
| Previous | Next |
|:--------------|------------------------:|
| [API](api.md) | [Building](building.md) |
</div>