Commit ffb21f92 authored by Marek Kadlečík's avatar Marek Kadlečík
Browse files

Added Rest API demo in README.md

parent 7e7f8195
Pipeline #141226 passed with stage
in 1 minute and 11 seconds
......@@ -23,6 +23,25 @@ You can run the Online Gaming Management System with maven:
- execute `mvn cargo:run` to start the server
- UI - open `http://localhost:8080/pa165/` in the browser
#### REST demo
We exposed `Player` entity in REST API.
Create a new player:
```bash
$ curl -X POST -i -H "Content-Type: application/json" --data '{"killStat":1, "deathStat":2, "assistStat":3}' http://localhost:8080/pa165/rest/players/create
```
Find player according to `uuid`: (Sadly, we haven't managed to fill application with sample data)
```bash
$ curl -X GET http://localhost:8080/pa165/rest/players/{uuid}
```
Find all players:
```bash
$ curl -X GET http://localhost:8080/pa165/rest/players
```
## Diagrams for assignment
### Class diagram
![Class diagram for this project](diagrams/UML class diagram.png)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment