add addLabel

- add class LabelPrototype
This commit is contained in:
Raffaele Mignone 2019-11-10 12:02:53 +01:00
parent af7334e42a
commit 850f33eeff
Signed by: norangebit
GPG Key ID: F5255658CB220573
2 changed files with 16 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package wekan.wrapper.api;
import retrofit2.Call;
import retrofit2.http.*;
import wekan.wrapper.entity.Board;
import wekan.wrapper.entity.LabelPrototype;
import wekan.wrapper.entity.MemberPermission;
import wekan.wrapper.entity.BoardPrototype;
@ -21,6 +22,12 @@ public interface BoardService {
@DELETE("api/boards/{boardId}")
Call<Void> deleteBoard(@Path("boardId") String boardId);
@PUT("/api/boards/{boardId}/labels")
Call<String> addLabel(
@Path("boardId") String board,
@Body LabelPrototype labelPrototype
);
@POST("/api/boards/{boardId}/members/{memberId}")
Call<Void> setMemberPermission(
@Path("boardId") String board,

View File

@ -0,0 +1,9 @@
package wekan.wrapper.entity;
public class LabelPrototype {
private Label label;
public LabelPrototype(String name, LabelColor color) {
label = new Label(null, name, color);
}
}