Events recovery

This commit is contained in:
Claude Brisson
2023-05-19 19:10:40 +02:00
parent 605b39123e
commit 2858ce4186
2 changed files with 27 additions and 0 deletions

24
curl.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
# Basic integration tests using curl...
curl -s --header "Accept: application/json" --header "Content-Type: application/json" \
--request POST \
--data '{ "type":"INDIVIDUAL","name":"Mon Tournoi", "shortName": "mon-tournoi", "startDate": "2023-05-10", "endDate": "2023-05-12", "country": "FR", "location": "Marseille", "online": false, "timeSystem": { "type": "fischer", "mainTime": "1200", "increment": "10" }, "pairing": { "type": "ROUNDROBIN" }, "rounds": 5 }' \
http://localhost:8080/api/tour
curl -s --header "Accept: application/json" http://localhost:8080/api/tour
curl -s --header "Accept: application/json" http://localhost:8080/api/tour/1
curl -s --header "Accept: application/json" --header "Content-Type: application/json" \
--request POST \
--data '{ "name": "Burma", "firstname": "Nestor", "rating": 1600, "rank": -2, "country": "FR", "club": "13Ma" }' \
http://localhost:8080/api/tour/1/part
curl -s --header "Accept: application/json" http://localhost:8080/api/tour/1/part
echo
echo
curl -s --header "Last-Event-Id: 0" http://localhost:8080/events