feature_card #4
@ -1,4 +1,74 @@
|
||||
package wekan.wrapper.api;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.*;
|
||||
import wekan.wrapper.entity.Card;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CardService {
|
||||
|
||||
/**
|
||||
* Get all cards belonging to a list
|
||||
*
|
||||
* @param boardID The board ID of cards
|
||||
* @param lidtID The list ID of cards
|
||||
* @return list of cards in the list
|
||||
*/
|
||||
@GET("/api/boards/{board}/lists/{list}/cards")
|
||||
Call<List<Card>> getAllCards(@Path("board") String boardID, @Path("list") String lidtID);
|
||||
|
||||
/**
|
||||
* Delete a card
|
||||
*
|
||||
* @param boardID The board ID of card
|
||||
* @param listID The list ID of card
|
||||
* @param cardID The card ID
|
||||
* @return void
|
||||
*/
|
||||
@DELETE("/api/boards/{board}/lists/{list}/cards/{card}")
|
||||
Call<Void> deleteCard(@Path("board") String boardID, @Path("list") String listID, @Path("card") String cardID);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param card new Card
|
||||
* @param boardID The ID of the board destination
|
||||
* @param listID The ID of the list destination
|
||||
* @return the card with matching ID
|
||||
*/
|
||||
@POST("/api/boards/{board}/lists/{list}/cards")
|
||||
Call<Card> newCard(@Body Card card, @Path("board") String boardID, @Path("list") String listID);
|
||||
|
||||
/**
|
||||
* Get information card
|
||||
* @param boardID the ID of the board
|
||||
* @param listID the ID of the list
|
||||
* @param cardID the ID of the card
|
||||
* @return card body
|
||||
*/
|
||||
@GET("/api/boards/{board}/lists/{list}/cards/{card}")
|
||||
Call<Card> getCard(@Path("board") String boardID, @Path("list") String listID, @Path("card") String cardID);
|
||||
|
||||
/**
|
||||
* Get list of cards by swinlaneID
|
||||
* @param boardID the ID of the board
|
||||
* @param swimlaneID the ID of the swimlane
|
||||
* @return list of swimlane cards
|
||||
*/
|
||||
@GET("/api/boards/{board}/swimlanes/{swimlane}/cards")
|
||||
Call<List<Card>> getCardsForswimlane(@Path("board") String boardID, @Path("swimlane") String swimlaneID);
|
||||
|
||||
/**
|
||||
* Update a card
|
||||
*
|
||||
* @param card params to update
|
||||
* @param boardID the id of the board
|
||||
* @param listID the id of the list
|
||||
* @param cardID the id of the card to modify
|
||||
* @return The card with the matching ID
|
||||
*/
|
||||
@Headers("Content-Type: application/merge-patch+json")
|
||||
@PUT("/api/boards/{board}/lists/{list}/cards/{card}")
|
||||
Call<Card> putCard(@Body Card card, @Path("board") String boardID, @Path("list") String listID,
|
||||
@Path("card") String cardID);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user