-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiPlayground.mli
51 lines (42 loc) · 2.01 KB
/
apiPlayground.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
(* ************************************************************************** *)
(* Project: Life - the game, Official OCaml SDK *)
(* Author: db0 ([email protected], http://db0.fr/) *)
(* Latest Version is on GitHub: https://github.com/Life-the-game/SDK-OCaml *)
(* ************************************************************************** *)
(** Playground API methods *)
open ApiTypes
(* ************************************************************************** *)
(** {3 Type} *)
(* ************************************************************************** *)
type activity =
| NetworkAddition of ApiUser.t
| NewMedia of (ApiAchievementStatus.t * ApiMedia.t list)
| AchievementUnlocked of ApiAchievementStatus.t
| NewObjective of ApiAchievementStatus.t
| LevelReached of int
| Other of (string
* ApiUser.t list
* ApiAchievementStatus.t list
* ApiMedia.t list
* string option)
| Failure of (string * activity)
type t = {
info : Info.t;
owner : ApiUser.t;
stype : string;
template : string;
activity : activity;
}
(* ************************************************************************** *)
(** {3 API Methods} *)
(* ************************************************************************** *)
(** Get activities *)
val get :
?auth:auth option
-> ?page:Page.parameters
-> ?activity_type:string list
-> id -> (t Page.t Api.t)
(* ************************************************************************** *)
(** {3 Tools} *)
(* ************************************************************************** *)
val from_json : req:requirements -> Yojson.Basic.json -> t