chessgame

RESTful chessgame developed with kotlin

View on GitHub

htwdd.chessgame.server.controller / DrawController

DrawController

@RestController @RequestMapping(["/api/draws"]) class DrawController

Controller to manage the draw resource

Author Felix Dimmel

Constructors

<init> DrawController(appProperties: AppProperties)
Controller to manage the draw resource

Functions

addDraw fun addDraw(matchId: Int, drawCode: String, startColumn: Int? = null, startRow: Int? = null, response: HttpServletResponse): ResponseEntity<Draw>
Handles the POST request for the URI /draws Params encoded as application/x-www-form-urlencode
addDrawByAi fun addDrawByAi(matchId: Int, response: HttpServletResponse): ResponseEntity<Draw>
Handles the POST request for the URI /draws/ai Params encoded as application/x-www-form-urlencode
addDrawByAiWithJson fun addDrawByAiWithJson(matchIdDTO: MatchIdDTO, response: HttpServletResponse): ResponseEntity<Draw>
Handles the POST request for the URI /draws/ai Params encoded as application/json
addDrawWithJson fun addDrawWithJson(drawDTO: DrawDTO, response: HttpServletResponse): ResponseEntity<Draw>
Handles the POST request for the URI /draws Params encoded as application/json
drawAiOptions fun drawAiOptions(response: HttpServletResponse): ResponseEntity<Unit>
Handles the OPTIONS request for the URI /draws/ai
drawByIdOptions fun drawByIdOptions(id: Int, response: HttpServletResponse): ResponseEntity<Unit>
Handles the OPTIONS request for the URI /draws/{id}
drawOptions fun drawOptions(response: HttpServletResponse): ResponseEntity<Unit>
Handles the OPTIONS request for the URI /draws
getDrawById fun getDrawById(id: Int, response: HttpServletResponse): ResponseEntity<Draw>
Handle the GET request for URI /draws/{id}
getDrawList fun getDrawList(response: HttpServletResponse): ResponseEntity<DrawList>
Handles the GET request for the URI /draws