rgncycle-libulfius/readme.md

49 lines
989 B
Markdown
Raw Permalink Normal View History

2023-03-15 17:50:14 +01:00
# rgncycle-libulfius
libulfius API for rgncycle
2023-03-15 20:53:49 +01:00
## preparation
2023-03-15 17:50:14 +01:00
```
2023-03-15 21:41:28 +01:00
sudo apt install make --no-install-recommends
sudo apt install build-essential --no-install-recommends
2023-03-15 20:53:49 +01:00
sudo apt install libulfius-dev --no-install-recommends
sudo apt install libconfig-dev --no-install-recommends
2023-03-15 17:50:14 +01:00
```
2023-03-24 15:52:46 +01:00
## test API
2023-04-03 15:22:19 +02:00
* test
```
curl -X GET http://<host>:<port>/hello
```
2023-03-24 15:52:46 +01:00
* create
```
curl --data "name=Hi from curl!" http://<host>:<port>/entities/create
curl -X POST --data "name=Hi from curl!" http://<host>:<port>/entities/create
```
* read all
```
curl -X GET http://<host>:<port>/entities/info
curl -X GET http://<host>:<port>/relations/info
curl -X GET http://<host>:<port>/distances/info
2023-03-24 15:52:46 +01:00
```
* read single
```
curl http://<host>:<port>/entities/35/info
```
* update
```
curl --data "name=Hi from curl!" http://<host>:<port>/entities/1/update
curl -X POST --data "name=Update!" http://<host>:<port>/entities/1/update
2023-03-24 15:52:46 +01:00
```
* delete
```
curl -X DELETE http://localhost:<port>/entities/1/delete
2023-03-24 15:52:46 +01:00
```