htwdd.chessgame.server.controller / PlayerController
PlayerController
@RestController @RequestMapping(["/api/players"]) class PlayerController
Controller to manage the match resource
Constructors
<init> | PlayerController() Controller to manage the match resource |
Functions
addPlayer | fun addPlayer(name: String , password: String , response: HttpServletResponse): ResponseEntity< Player > Handles the POST request for the URI /players Params encoded as application/x-www-form-urlencode |
addPlayerWithJson | fun addPlayerWithJson(playerDTO: PlayerDTO , response: HttpServletResponse): ResponseEntity< Player > Handles the POST request for the URI /players Params encoded as application/json |
deletePlayerById | fun deletePlayerById(id: Int , response: HttpServletResponse): ResponseEntity< Unit > Handles the DELETE request for the URI /players/{id} |
getPlayerById | fun getPlayerById(id: Int , response: HttpServletResponse): ResponseEntity< Player > Handle the GET request for URI /matches/{id} |
getPlayerList | fun getPlayerList(response: HttpServletResponse): ResponseEntity< PlayerHashMap > Handles the GET request for the URI /players |
playerByIdOptions | fun playerByIdOptions(id: Int , response: HttpServletResponse): ResponseEntity< Unit > Handles the OPTIONS request for the URI /players/{id} |
playerOptions | fun playerOptions(response: HttpServletResponse): ResponseEntity< Unit > Handles the OPTIONS request for the URI /players |
updatePlayer | fun updatePlayer(id: Int , password: String , response: HttpServletResponse): ResponseEntity< Unit > Handles the PATCH request for the URI /players/{id} Params encoded as application/x-www-form-urlencode |
updatePlayerWithJson | fun updatePlayerWithJson(id: Int , passwordDTO: PasswordDTO , response: HttpServletResponse): ResponseEntity< Unit > Handles the PATCH request for the URI /players/{id} |