Open bregySilvan opened 6 years ago
Good work! I recommend you move this to a fixed document though (gitub wiki) unless you want to use this issue to talk about the current implementation. You should do that in person in class though.
Try to be as specific as possible when defining an interface like this. IBoard is not going to work as actual payload, the API interface should be as language neutral as possible. You can define what makes up a board as a shortcut, but that still needs to be valid JSON so there is no way the interface can be misinterpreted. To achieve this:
@bregySilvan Nice work, now our specification is identical with our code! Good job, cherio! #35 has been closed!
@SvenHutter @noulyn Please have a look at the latest changes including the definition of the post-request.
Description
Interfaces
API
/title
|{ }
|{ titles: string[] }
/title/
|{ id: string }
|{ title: string }
/data
|{ }
|{ data: any }
/board/
|{ id: string }
|{ board: IBoard \| null }
/boards
|{ count: string }
|{ boards: IBoard[] }
/boardlist
|{ }
|{ boardInfos: IBoardInfo[] }
/board/${id}
|{ id: string }
|history
13.03.2018 add
/boardlist
location for reading out all board titles with its ids. 13.03.2018 add interfaceIBoardInfo
which holds an id with a title. 13.03.2018 change all numbers to strings 14.03.2018 removedget title/id
14.03.2018 add/board/id
on which will happen a Post-Request 21.03.2018 remove id from/board
and/title
. They have only a payload