Add ChecklistService #14

Manually merged
UmbertoF merged 4 commits from feature_checklist into develop 2019-11-16 14:46:48 +00:00
3 changed files with 7 additions and 16 deletions
Showing only changes of commit cf59f3b325 - Show all commits

View File

@ -5,7 +5,7 @@ import retrofit2.http.*;
import wekan.wrapper.entity.Checklist;
import wekan.wrapper.entity.ChecklistItem;
import wekan.wrapper.entity.ChecklistPrototype;
import wekan.wrapper.entity.TestBody;
import wekan.wrapper.entity.ChecklistItemStatus;
import java.util.List;
@ -130,17 +130,17 @@ public interface ChecklistService {
* @param cardId The ID of the card
* @param checklistId The ID of the checklist
* @param itemId The ID of the item
* @param isFinished True if the item is done
* @param itemStatus The status of the item
* @return The ID of the checklist item
* @see ChecklistItemStatus
*/
@FormUrlEncoded
@PUT("/api/boards/{boardId}/cards/{cardId}/checklists/{checklistId}/items/{itemId}")
Call<ChecklistItem> editChecklistItem(
@Path("boardId") String boardId,
@Path("cardId") String cardId,
@Path("checklistId") String checklistId,
@Path("itemId") String itemId,
@Field("isFinished") boolean isFinished
@Body ChecklistItemStatus itemStatus
);
/**
@ -159,13 +159,4 @@ public interface ChecklistService {
@Path("checklistId") String checklistId,
@Path("itemId") String itemId
);
@PUT("/api/boards/{boardId}/cards/{cardId}/checklists/{checklistId}/items/{itemId}")
Call<ChecklistItem> editChecklistItem(
@Path("boardId") String boardId,
@Path("cardId") String cardId,
@Path("checklistId") String checklistId,
@Path("itemId") String itemId,
@Body TestBody isFinished
);
}

View File

@ -1,9 +1,9 @@
package wekan.wrapper.entity;
public class TestBody {
public class ChecklistItemStatus {
private boolean isFinished;
public TestBody(boolean isFinished) {
public ChecklistItemStatus(boolean isFinished) {
this.isFinished = isFinished;
}
}

View File

@ -229,7 +229,7 @@ public class ChecklistServiceTest {
"card id",
"checklist id",
"item id",
true
new ChecklistItemStatus(true)
)
.execute().body();