htwdd.chessgame.server.controller / MatchController
MatchController
@RestController @RequestMapping(["/api/matches"]) class MatchController
Controller to manage the match resource
Author Felix Dimmel
Constructors
<init> | MatchController() Controller to manage the match resource |
Functions
addMatch | fun addMatch(playerWhiteId: Int , playerBlackId: Int , response: HttpServletResponse): ResponseEntity< Match > Handles the POST request for the URI /matches Params encoded as application/x-www-form-urlencode |
addMatchWithJson | fun addMatchWithJson(matchDTO: MatchDTO , response: HttpServletResponse): ResponseEntity< Match > Handles the POST request for the URI /draws Params encoded as application/json |
deleteMatchById | fun deleteMatchById(id: Int , response: HttpServletResponse): ResponseEntity< Unit > Handles the DELETE request for the URI /matches/{id} |
drawsByMatchOptions | fun drawsByMatchOptions(id: Int , response: HttpServletResponse): ResponseEntity< Unit > Handles the OPTIONS request for the URI /matches/{id}/draws |
getDrawsByMatchId | fun getDrawsByMatchId(id: Int , response: HttpServletResponse): ResponseEntity< DrawList > Handles the GET request for the URI /matches/{id}/draws |
getMatchById | fun getMatchById(id: Int , includePieceSets: Boolean , includeHistory: Boolean , response: HttpServletResponse): ResponseEntity< Match > Handles the GET request for the URI /matches/{id} |
getMatchList | fun getMatchList(includePieceSets: Boolean , includeHistory: Boolean , response: HttpServletResponse): ResponseEntity< MatchHashMap > Handles the GET request for the URI /matches |
getPieceSetsByMatchId | fun getPieceSetsByMatchId(id: Int , response: HttpServletResponse): ResponseEntity< PieceSetHashMap > Handles the GET request for the URI /matches/{id}/pieceSets |
matchByIdOptions | fun matchByIdOptions(id: Int , response: HttpServletResponse): ResponseEntity< Unit > Handles the OPTIONS request for the URI /matches/{id} |
matchOptions | fun matchOptions(response: HttpServletResponse): ResponseEntity< Unit > Handles the OPTIONS request for the URI /matches |
pieceSetsByMatchOptions | fun pieceSetsByMatchOptions(id: Int , response: HttpServletResponse): ResponseEntity< Unit > Handles the OPTIONS request for the URI /matches/{id}/pieceSets |