blob: d69ee8513057d8f1aff5c6b9c425ac6e4b246162 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
package it.niedermann.nextcloud.deck.api;
import java.util.List;
import io.reactivex.Observable;
import it.niedermann.nextcloud.deck.model.ocs.Activity;
import it.niedermann.nextcloud.deck.model.ocs.Capabilities;
import it.niedermann.nextcloud.deck.model.ocs.comment.DeckComment;
import it.niedermann.nextcloud.deck.model.ocs.comment.OcsComment;
import it.niedermann.nextcloud.deck.model.ocs.user.OcsUser;
import it.niedermann.nextcloud.deck.model.ocs.user.OcsUserList;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface NextcloudServerAPI {
@GET("cloud/capabilities?format=json")
Observable<Capabilities> getCapabilities();
@GET("cloud/users?format=json")
Observable<OcsUserList> getAllUsers();
@GET("cloud/users/{uid}?format=json")
Observable<OcsUser> getUserDetails(@Path("uid") String uid);
@GET("apps/activity/api/v2/activity/filter?format=json&object_type=deck_card&limit=50&since=-1&sort=asc")
Observable<List<Activity>> getActivitiesForCard(@Query("object_id") long cardId);
@Headers({
"Accept: application/json",
"Content-Type: application/json;charset=utf-8"
})
@GET("apps/deck/api/v1.0/cards/{cardId}/comments")
Observable<OcsComment> getCommentsForCard(@Path("cardId") long cardId);
@Headers({
"Accept: application/json",
"Content-Type: application/json;charset=utf-8"
})
@POST("apps/deck/api/v1.0/cards/{cardId}/comments")
Observable<OcsComment> createCommentForCard(@Path("cardId") long cardId, @Body DeckComment comment);
@Headers({
"Accept: application/json",
"Content-Type: application/json;charset=utf-8"
})
@PUT("apps/deck/api/v1.0/cards/{cardId}/comments/{commentId}")
Observable<OcsComment> updateCommentForCard(@Path("cardId") long cardId, @Path("commentId") long commentId, @Body DeckComment comment);
@Headers({
"Accept: application/json",
"Content-Type: application/json;charset=utf-8"
})
@DELETE("apps/deck/api/v1.0/cards/{cardId}/comments/{commentId}")
Observable<Void> deleteCommentForCard(@Path("cardId") long cardId, @Path("commentId") long commentId);
}
|