-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiConf.ml
31 lines (25 loc) · 1.33 KB
/
apiConf.ml
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
(* ************************************************************************** *)
(* 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 *)
(* ************************************************************************** *)
(** Configuration of the library *)
(** The URL of the API Web service *)
let base_url = ref "http://api.life.tl/api/v1"
(** Print log messages or not? *)
let verbose = ref false
(** User-Agent used in the HTTP requests headers *)
(** Note: it's only changeable BEFORE the first call to an API method *)
let user_agent = ref "OCaml-library-v2"
(** Where do I print the log messages? *)
let verbose_output = ref stdout
let set_verbose_file str =
verbose_output := open_out str
(** Where do I print the info dumped by the ApiDump module? *)
let dump_output = ref stdout
let set_dump_file str =
dump_output := open_out str
let set_all_output str =
let o = open_out str in
verbose_output := o;
dump_output := o