49 lines
1.5 KiB
Java
49 lines
1.5 KiB
Java
package it.unisannio.ding.ids.wedroid.wrapper.api;
|
|
|
|
import it.unisannio.ding.ids.wedroid.wrapper.entity.Swimlane;
|
|
import retrofit2.Call;
|
|
import retrofit2.http.*;
|
|
|
|
import java.util.List;
|
|
|
|
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);
|
|
}
|