mirror of
https://github.com/onyx-and-iris/vmr-http.git
synced 2026-04-06 09:59:11 +00:00
add link to API_EXAMPLES in README
This commit is contained in:
parent
20756f489f
commit
a492006d67
@ -1,4 +1,4 @@
|
|||||||
# API Usage Examples
|
# API Usage
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
@ -62,6 +62,32 @@ curl -X 'PATCH' \
|
|||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Strip Gate Router
|
||||||
|
|
||||||
|
### */strip/{index}/gate*
|
||||||
|
|
||||||
|
> Get single parameter
|
||||||
|
|
||||||
|
```console
|
||||||
|
curl -X 'GET' \
|
||||||
|
'http://127.0.0.1:8000/strip/0/gate/knob' \
|
||||||
|
-H 'accept: application/json'
|
||||||
|
```
|
||||||
|
|
||||||
|
> Set multiple parameters
|
||||||
|
|
||||||
|
```console
|
||||||
|
curl -X 'PATCH' \
|
||||||
|
'http://127.0.0.1:8000/strip/0/gate' \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"threshold": -28.7,
|
||||||
|
"damping": -60,
|
||||||
|
"attack": 2
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Bus Router
|
## Bus Router
|
||||||
@ -72,7 +98,7 @@ curl -X 'PATCH' \
|
|||||||
|
|
||||||
```console
|
```console
|
||||||
curl -X 'GET' \
|
curl -X 'GET' \
|
||||||
'http://127.0.0.1:8000/bus/1/mono' \
|
'http://127.0.0.1:8000/bus/0/mono' \
|
||||||
-H 'accept: application/json'
|
-H 'accept: application/json'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,9 @@ uvicorn vmr_http:app
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
FastAPI generates [automatic docs][auto-docs], simply launch the server and then visit:
|
For a few examples see [./API_EXAMPLES.md].
|
||||||
|
|
||||||
|
For an exhaustive list of the endpoints FastAPI generates [automatic docs][auto-docs], simply launch the server and then visit:
|
||||||
|
|
||||||
*Swagger UI*
|
*Swagger UI*
|
||||||
- http://localhost:8000/docs
|
- http://localhost:8000/docs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user