|
@@ -55,4 +55,21 @@ set the score of a player
|
|
|
### DELETE /players
|
|
### DELETE /players
|
|
|
remove all players
|
|
remove all players
|
|
|
|
|
|
|
|
|
|
+### Examples
|
|
|
|
|
+```
|
|
|
|
|
+curl -X POST -d '{"name":"Player 1","score":0}' -H "Content-Type: application/json" http://127.0.0.1:8080/players
|
|
|
|
|
+
|
|
|
|
|
+curl -X POST -d '{"name":"Player 2","score":0}' -H "Content-Type: application/json" http://127.0.0.1:8080/players
|
|
|
|
|
+
|
|
|
|
|
+curl -X POST -d '{"name":"Player 3","score":0}' -H "Content-Type: application/json" http://127.0.0.1:8080/players
|
|
|
|
|
+
|
|
|
|
|
+curl -X POST -d '{"name":"Player 4","score":0}' -H "Content-Type: application/json" http://127.0.0.1:8080/players
|
|
|
|
|
+
|
|
|
|
|
+curl -X PATCH -d '{"score":42}' -H "Content-Type: application/json" "http://127.0.0.1:8080/players/Player%201"
|
|
|
|
|
+
|
|
|
|
|
+curl -X GET "http://127.0.0.1:8080/players/Player%201"
|
|
|
|
|
+
|
|
|
|
|
+curl -X GET "http://127.0.0.1:8080/players/Player%202"
|
|
|
|
|
|
|
|
|
|
+curl -X DELETE -H "Content-Type: application/json" http://127.0.0.1:8080/players
|
|
|
|
|
+```
|