-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiComment.mli
71 lines (58 loc) · 2.37 KB
/
apiComment.mli
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
64
65
66
67
68
69
70
71
(* ************************************************************************** *)
(* Project: Life - the game, Official OCaml SDK *)
(* Author: nox *)
(* Latest Version is on GitHub: https://github.com/Life-the-game/SDK-OCaml *)
(* ************************************************************************** *)
(** User's commenting API methods *)
open ApiTypes
(* ************************************************************************** *)
(** {Type} *)
(* ************************************************************************** *)
type t =
{
info : Info.t;
approvement : Approvable.t;
author : ApiUser.t;
content : string;
medias : ApiMedia.t list;
}
(* ************************************************************************** *)
(** {API Methods} *)
(* ************************************************************************** *)
(* Get comments on an achievement status *)
val get :
?page:Page.parameters
-> ?with_medias:bool option
-> id -> t ApiTypes.Page.t Api.t
(* Get one specific comment on an achievement status *)
val get_one :
id (** achievement status id *)
-> id (** comment id *)
-> t Api.t
(* Create a comment on an achievement status *)
val create :
auth:auth
(* PRIVATE *)
-> ?author:string option
(* /PRIVATE *)
-> ?medias:file list
-> content:string
-> id -> t Api.t
(* Approve a comment on an achievement status *)
val approve :
auth:auth
(* PRIVATE *)
-> approver:string
(* /PRIVATE *)
-> id -> id -> unit Api.t
(* Disapprove a comment on an achievement status *)
val disapprove :
auth:auth
(* PRIVATE *)
-> disapprover:id
(* /PRIVATE *)
-> id -> id -> unit Api.t
(* ************************************************************************** *)
(** {Tools} *)
(* ************************************************************************** *)
val from_json : Yojson.Basic.json -> t