58 lines
1.5 KiB
Java
58 lines
1.5 KiB
Java
package it.unisannio.ding.ids.wedroid.wrapper.api;
|
|
|
|
import it.unisannio.ding.ids.wedroid.wrapper.entity.WList;
|
|
import java.util.List;
|
|
import retrofit2.Call;
|
|
import retrofit2.http.DELETE;
|
|
import retrofit2.http.Field;
|
|
import retrofit2.http.FormUrlEncoded;
|
|
import retrofit2.http.GET;
|
|
import retrofit2.http.POST;
|
|
import retrofit2.http.Path;
|
|
|
|
public interface ListService {
|
|
|
|
/**
|
|
* Get the list of Lists attached to a board
|
|
*
|
|
* @param boardId the ID of the board
|
|
* @return the list of all lists
|
|
*/
|
|
@GET("/api/boards/{board}/lists")
|
|
Call<List<WList>> getAllList(@Path("board") String boardId);
|
|
|
|
/**
|
|
* Add a List to a board
|
|
*
|
|
* @param boardId the ID of the string
|
|
* @param title title of the new list
|
|
* @return the new list
|
|
*/
|
|
@FormUrlEncoded
|
|
@POST("/api/boards/{board}/lists")
|
|
Call<WList> newList(
|
|
@Path("board") String boardId,
|
|
@Field("title") String title
|
|
);
|
|
|
|
/**
|
|
* Get a List attached to a board
|
|
* @param boardId the ID of the board
|
|
* @param listId the ID of the list
|
|
* @return the list
|
|
*/
|
|
@GET("/api/boards/{board}/lists/{list}")
|
|
Call<WList> getList(@Path("board") String boardId, @Path("list") String listId);
|
|
|
|
/**
|
|
* Delete a List
|
|
* @param boardId the ID of the board
|
|
* @param listId the ID of the list
|
|
* @return ID of the delete list
|
|
*/
|
|
@DELETE("/api/boards/{board}/lists/{list}")
|
|
Call<WList> deleteList(@Path("board") String boardId, @Path("list") String listId);
|
|
|
|
|
|
}
|