listServices #11
17
wrapper/src/main/java/wekan/wrapper/api/ListService.java
Normal file
17
wrapper/src/main/java/wekan/wrapper/api/ListService.java
Normal file
@ -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<List<WList>> getAllList(@Path("board") String boardId);
|
||||||
|
|
||||||
|
@POST("/api/boards/{board}/lists")
|
||||||
|
Call<WList> newList(@Path("board") String board, @Body String title);
|
||||||
|
|
||||||
|
}
|
17
wrapper/src/main/java/wekan/wrapper/entity/WList.java
Normal file
17
wrapper/src/main/java/wekan/wrapper/entity/WList.java
Normal file
@ -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 + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user