Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordesperateCoder <echotodevnull@gmail.com>2019-03-08 23:05:32 +0300
committerdesperateCoder <echotodevnull@gmail.com>2019-03-08 23:05:32 +0300
commit4ac248a00f76856ca3b6e59fcdb65cc3f2ae975c (patch)
tree0e8ebd7c9fde69ae1601887ebf47666ce0f222dc
parent891ebe063d119b03ef02d804f2d60b0aeb451593 (diff)
added attachment endpoints
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/api/DeckAPI.java18
-rw-r--r--build.gradle2
2 files changed, 16 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/api/DeckAPI.java b/app/src/main/java/it/niedermann/nextcloud/deck/api/DeckAPI.java
index 5fb7fd03f..d8f7d9803 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/api/DeckAPI.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/api/DeckAPI.java
@@ -4,6 +4,7 @@ package it.niedermann.nextcloud.deck.api;
import java.util.List;
import io.reactivex.Observable;
+import it.niedermann.nextcloud.deck.model.Attachment;
import it.niedermann.nextcloud.deck.model.Board;
import it.niedermann.nextcloud.deck.model.Card;
import it.niedermann.nextcloud.deck.model.Label;
@@ -107,8 +108,19 @@ public interface DeckAPI {
// ### ATTACHMENTS
- //TODO: create attachment entity and implement endpoints
-// @GET("board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments")
-// Observable<List<Attachment>> getLabel(@Path("boardId") long boardId, @Path("labelId") long labelId, @Header(MODIFIED_SINCE_HEADER) String lastSync);
+ @GET("board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments")
+ Observable<List<Attachment>> getAttachment(@Path("boardId") long boardId, @Path("stackId") long stackId, @Path("cardId") long cardId, @Header(MODIFIED_SINCE_HEADER) String lastSync);
+
+ @POST("board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments")
+ Observable<List<Attachment>> uploadAttachment(@Path("boardId") long boardId, @Path("stackId") long stackId, @Path("cardId") long cardId);
+
+ @PUT("board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}")
+ Observable<List<Attachment>> updateAttachment(@Path("boardId") long boardId, @Path("stackId") long stackId, @Path("cardId") long cardId, @Path("attachmentId") long attachmentId);
+
+ @DELETE("board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}")
+ Observable<List<Attachment>> deleteAttachment(@Path("boardId") long boardId, @Path("stackId") long stackId, @Path("cardId") long cardId, @Path("attachmentId") long attachmentId);
+
+ @PUT("board/{boardId}/stacks/{stackId}/cards/{cardId}/attachments/{attachmentId}/restore")
+ Observable<List<Attachment>> restoreAttachment(@Path("boardId") long boardId, @Path("stackId") long stackId, @Path("cardId") long cardId, @Path("attachmentId") long attachmentId);
}
diff --git a/build.gradle b/build.gradle
index 4f0a91610..9447929fe 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.1'
+ classpath 'com.android.tools.build:gradle:3.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files