mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
feat: a lot
i did a lot of work, and i also forgot to add commits regularly. I added the controller routes to create and delete controllers, improved error handling und improved the authentification process. I'm gonna add an websocket next and then I should be hopefully done with the foundations of this project. I may also add anviewControllers route which respons with every available controller
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Laterna
|
||||
# 🛋️ Laterna (Server)
|
||||
|
||||
## 🛜 API Documentation
|
||||
|
||||
@@ -40,26 +40,26 @@ Authorization: <token>
|
||||
#### Create a new controller
|
||||
```bash
|
||||
$ curl -X POST http://your-server.com/api/v1/controllers \
|
||||
-H "Authorization: $TOKEN"
|
||||
-H "Authorization: $TOKEN"
|
||||
```
|
||||
Respons with the newly assigned ID
|
||||
ℹ️ Response with the newly assigned ID. The ID will always be the next available one
|
||||
|
||||
#### Delete an controller
|
||||
```bash
|
||||
$ curl -X DELETE localhost:8080/api/v1/controllers \
|
||||
-H "Authorization: $TOKEN" \
|
||||
-d '{"ID": 1}'
|
||||
-H "Authorization: $TOKEN" \
|
||||
-d '{"ID": 1}'
|
||||
```
|
||||
|
||||
|
||||
#### Get the current color of an controller
|
||||
```bash
|
||||
$ curl -X GET localhost:8080/api/v1/colors/1 \
|
||||
-H "Authorization: $TOKEN"
|
||||
-H "Authorization: $TOKEN"
|
||||
```
|
||||
#### Set the color of an controller
|
||||
```bash
|
||||
$ curl -X PUT localhost:8080/api/v1/colors/1 \
|
||||
-H "Authorization:$TOKEN" \
|
||||
-d '{"Color": "#C2C342"}'
|
||||
-H "Authorization:$TOKEN" \
|
||||
-d '{"Color": "#C2C342"}'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user