diff --git a/wrapper/src/main/java/wekan/wrapper/api/BoardService.java b/wrapper/src/main/java/wekan/wrapper/api/BoardService.java index 5f1d96c..78d7f27 100644 --- a/wrapper/src/main/java/wekan/wrapper/api/BoardService.java +++ b/wrapper/src/main/java/wekan/wrapper/api/BoardService.java @@ -10,31 +10,77 @@ import wekan.wrapper.entity.BoardPrototype; import java.util.List; public interface BoardService { + + /** + * Get all public boards. + * + * @return the list with all public boards + */ @GET("api/boards") Call> getPublicBoards(); + /** + * Create a board. + * + * @param boardPrototype the prototype of the new board + * @return the new board + * @see BoardPrototype + */ @POST("api/boards") Call newBoard(@Body BoardPrototype boardPrototype); + /** + * Get the board with that particular ID. + * + * @param boardId The ID of the board + * @return The board with the matching ID + */ @GET("api/boards/{boardId}") Call getBoard(@Path("boardId") String boardId); + /** + * Delete the board with that particular ID + * + * @param boardId The ID of the board + */ @DELETE("api/boards/{boardId}") Call deleteBoard(@Path("boardId") String boardId); + /** + * Add a label to a board. + * + * @param boardId The ID of the board + * @param labelPrototype The prototype of new label + * @return The ID of new label + * @see LabelPrototype + */ @PUT("/api/boards/{boardId}/labels") Call addLabel( - @Path("boardId") String board, + @Path("boardId") String boardId, @Body LabelPrototype labelPrototype ); + /** + * Change the permission of a member of a board. + * + * @param boardId The ID of the board + * @param memberId The ID of the member + * @param memberPermission The new role of the member + * @see MemberPermission + */ @POST("/api/boards/{boardId}/members/{memberId}") Call setMemberPermission( - @Path("boardId") String board, - @Path("memberId") String member, + @Path("boardId") String boardId, + @Path("memberId") String memberId, @Body MemberPermission memberPermission ); + /** + * Get all boards attached to a user. + * + * @param userId The ID of the user + * @return The list with all user's boards + */ @GET("api/users/{userId}/boards") Call> getBoardsFromUser(@Path("userId") String userId); } diff --git a/wrapper/src/main/java/wekan/wrapper/entity/Board.java b/wrapper/src/main/java/wekan/wrapper/entity/Board.java index 96a9eea..175afdf 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/Board.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/Board.java @@ -16,7 +16,7 @@ public class Board { private int starts; private List