53 lines
1.6 KiB
Java
53 lines
1.6 KiB
Java
package it.unisannio.ding.ids.wedroid.wrapper.api;
|
|
|
|
import it.unisannio.ding.ids.wedroid.wrapper.entity.Swimlane;
|
|
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 SwimlanesService {
|
|
/**
|
|
* Get the list of swimlanes attached to a board.
|
|
*
|
|
* @param boardId The ID of the board
|
|
* @return The list of swimlanes
|
|
*/
|
|
@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
|
|
*/
|
|
@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);
|
|
}
|