wedroid/wrapper/src/main/java/it/unisannio/ding/ids/wedroid/wrapper/api/SwimlanesService.java

53 lines
1.6 KiB
Java
Raw Normal View History

2019-11-24 17:48:40 +00:00
package it.unisannio.ding.ids.wedroid.wrapper.api;
2019-11-11 20:35:40 +00:00
2019-11-24 17:48:40 +00:00
import it.unisannio.ding.ids.wedroid.wrapper.entity.Swimlane;
2019-11-11 20:35:40 +00:00
import java.util.List;
2020-01-18 11:54:19 +00:00
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;
2019-11-11 20:35:40 +00:00
public interface SwimlanesService {
/**
* Get the list of swimlanes attached to a board.
*
* @param boardId The ID of the board
* @return The list of swimlanes
*/
2019-11-11 20:35:40 +00:00
@GET("/api/boards/{boardId}/swimlanes")
Call<List<Swimlane>> getAllSwimlanes(@Path("boardId") String boardId);
/**
* Add a swimlane to a board.
*
* @param boardId The ID of the board
* @param swimlaneTitle The new title of the swimlane
* @return The new swimlane
*/
2019-11-11 20:35:40 +00:00
@FormUrlEncoded
@POST("/api/boards/{boardId}/swimlanes")
Call<Swimlane> newSwimlane(@Path("boardId") String boardId, @Field("title") String swimlaneTitle);
/**
* Get a swimlane.
*
* @param boardId The ID of the board
* @param swimlaneId The ID of the swimlane
* @return The swimlane
*/
@GET("/api/boards/{boardId}/swimlanes/{swimlaneId}")
Call<Swimlane> getSwimlane(@Path("boardId") String boardId, @Path("swimlaneId") String swimlaneId);
/**
* Delete a swimlane.
*
* @param boardId The ID of the board
* @param swimlaneId The ID of the swimlane
*/
@DELETE("/api/boards/{boardId}/swimlanes/{swimlaneId}")
Call<Void> deleteSwimlane(@Path("boardId") String boardId, @Path("swimlaneId") String swimlaneId);
2019-11-11 20:35:40 +00:00
}