From 1cac40cf106fd1880392156104e2b535a758c32b Mon Sep 17 00:00:00 2001 From: noemi3 Date: Sat, 9 Nov 2019 19:22:16 +0100 Subject: [PATCH] added newList and getAllList --- .../java/wekan/wrapper/api/ListService.java | 17 +++++++++++++++++ .../main/java/wekan/wrapper/entity/WList.java | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 wrapper/src/main/java/wekan/wrapper/api/ListService.java create mode 100644 wrapper/src/main/java/wekan/wrapper/entity/WList.java diff --git a/wrapper/src/main/java/wekan/wrapper/api/ListService.java b/wrapper/src/main/java/wekan/wrapper/api/ListService.java new file mode 100644 index 0000000..ec51a67 --- /dev/null +++ b/wrapper/src/main/java/wekan/wrapper/api/ListService.java @@ -0,0 +1,17 @@ +package wekan.wrapper.api; + +import retrofit2.Call; +import retrofit2.http.*; +import wekan.wrapper.entity.WList; + +import java.util.List; + + +public interface ListService { + @GET("/api/boards/{board}/lists") + Call> getAllList(@Path("board") String boardId); + + @POST("/api/boards/{board}/lists") + Call newList(@Path("board") String board, @Body String title); + +} diff --git a/wrapper/src/main/java/wekan/wrapper/entity/WList.java b/wrapper/src/main/java/wekan/wrapper/entity/WList.java new file mode 100644 index 0000000..7730125 --- /dev/null +++ b/wrapper/src/main/java/wekan/wrapper/entity/WList.java @@ -0,0 +1,17 @@ +package wekan.wrapper.entity; + +import com.google.gson.annotations.SerializedName; + +public class WList { + @SerializedName("_id") + private String id; + private String title; + + @Override + public String toString() { + return "WList{" + + "id='" + id + '\'' + + ", title='" + title + '\'' + + '}'; + } +}