package otoggl
Library
Module
Module type
Parameter
Class
Class type
Helper types
type datetime = Toggl_t.datetime
Response types
type time_entry_update_request = Toggl_t.time_entry_update_request = {
description : string option;
wid : int option;
pid : int option option;
start : datetime option;
stop : datetime option option;
duration : int option;
duronly : bool option;
billable : bool option;
}
Represents a time entry as we send to Toggl when updating one
type wrapped_time_entry_update_request =
Toggl_t.wrapped_time_entry_update_request =
{
time_entry : time_entry_update_request;
}
type time_entry_request = Toggl_t.time_entry_request = {
description : string;
wid : int option;
pid : int option;
start : datetime option;
stop : datetime option option;
duration : int;
created_with : string;
duronly : bool;
billable : bool;
}
Represents a time entry as we send to Toggl when starting or creating one
type wid = Toggl_t.wid
type project_request = Toggl_t.project_request = {
wid : wid;
name : string;
billable : bool;
is_private : bool;
active : bool;
auto_estimates : bool;
estimated_hours : bool;
actual_hours : int;
template : bool;
template_id : int option;
cid : int option;
color : string option;
hex_color : string option;
}
Represents a project as we send to Toggl when creating one
type workspace = Toggl_t.workspace = {
id : wid;
name : string;
default_currency : string;
at : datetime;
admin : bool;
default_hourly_rate : float;
only_admins_may_create_projects : bool;
only_admins_see_billable_rates : bool;
only_admins_see_team_dashboard : bool;
projects_billable_by_default : bool;
rounding : int;
rounding_minutes : int;
ical_enabled : bool;
api_token : string option;
profile : int option;
logo_url : string option;
}
Represents a workspace in Toggl
type workspace_list = Toggl_t.workspace_list
type uid = Toggl_t.uid
type tid = Toggl_t.tid
type pid = Toggl_t.pid
type time_entry = Toggl_t.time_entry = {
id : tid;
wid : wid;
uid : uid;
description : string;
at : datetime;
pid : pid option;
start : datetime;
stop : datetime option;
duration : int;
duronly : bool;
billable : bool;
}
Represents a time enty as will be returned from the Toggl API
type time_entry_list = Toggl_t.time_entry_list
type tid_list = Toggl_t.tid_list
type project = Toggl_t.project = {
id : pid;
wid : wid;
name : string;
at : datetime;
created_at : datetime option;
billable : bool;
is_private : bool;
active : bool;
auto_estimates : bool;
estimated_hours : bool;
actual_hours : int;
template : bool;
template_id : int option;
color : string option;
hex_color : string option;
}
Represents a project in Toggl
type project_list = Toggl_t.project_list
type pid_list = Toggl_t.pid_list
Request types
val string_of_datetime : ?len:int -> datetime -> string
Serialize a value of type datetime
into a JSON string.
val read_datetime : Yojson.Safe.lexer_state -> Lexing.lexbuf -> datetime
Input JSON data of type datetime
.
val write_time_entry_update_request :
Buffer.t ->
time_entry_update_request ->
unit
Output a JSON value of type time_entry_update_request
.
val string_of_time_entry_update_request :
?len:int ->
time_entry_update_request ->
string
Serialize a value of type time_entry_update_request
into a JSON string.
val read_time_entry_update_request :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
time_entry_update_request
Input JSON data of type time_entry_update_request
.
val time_entry_update_request_of_string : string -> time_entry_update_request
Deserialize JSON data of type time_entry_update_request
.
val write_wrapped_time_entry_update_request :
Buffer.t ->
wrapped_time_entry_update_request ->
unit
Output a JSON value of type wrapped_time_entry_update_request
.
val string_of_wrapped_time_entry_update_request :
?len:int ->
wrapped_time_entry_update_request ->
string
Serialize a value of type wrapped_time_entry_update_request
into a JSON string.
val read_wrapped_time_entry_update_request :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
wrapped_time_entry_update_request
Input JSON data of type wrapped_time_entry_update_request
.
val wrapped_time_entry_update_request_of_string :
string ->
wrapped_time_entry_update_request
Deserialize JSON data of type wrapped_time_entry_update_request
.
val write_time_entry_request : Buffer.t -> time_entry_request -> unit
Output a JSON value of type time_entry_request
.
val string_of_time_entry_request : ?len:int -> time_entry_request -> string
Serialize a value of type time_entry_request
into a JSON string.
val read_time_entry_request :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
time_entry_request
Input JSON data of type time_entry_request
.
val time_entry_request_of_string : string -> time_entry_request
Deserialize JSON data of type time_entry_request
.
val write_wrapped_time_entry : Buffer.t -> wrapped_time_entry -> unit
Output a JSON value of type wrapped_time_entry
.
val string_of_wrapped_time_entry : ?len:int -> wrapped_time_entry -> string
Serialize a value of type wrapped_time_entry
into a JSON string.
val read_wrapped_time_entry :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
wrapped_time_entry
Input JSON data of type wrapped_time_entry
.
val wrapped_time_entry_of_string : string -> wrapped_time_entry
Deserialize JSON data of type wrapped_time_entry
.
val read_wid : Yojson.Safe.lexer_state -> Lexing.lexbuf -> wid
Input JSON data of type wid
.
val write_project_request : Buffer.t -> project_request -> unit
Output a JSON value of type project_request
.
val string_of_project_request : ?len:int -> project_request -> string
Serialize a value of type project_request
into a JSON string.
val read_project_request :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
project_request
Input JSON data of type project_request
.
val project_request_of_string : string -> project_request
Deserialize JSON data of type project_request
.
val write_wrapped_project_request : Buffer.t -> wrapped_project_request -> unit
Output a JSON value of type wrapped_project_request
.
val string_of_wrapped_project_request :
?len:int ->
wrapped_project_request ->
string
Serialize a value of type wrapped_project_request
into a JSON string.
val read_wrapped_project_request :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
wrapped_project_request
Input JSON data of type wrapped_project_request
.
val wrapped_project_request_of_string : string -> wrapped_project_request
Deserialize JSON data of type wrapped_project_request
.
val string_of_workspace : ?len:int -> workspace -> string
Serialize a value of type workspace
into a JSON string.
val read_workspace : Yojson.Safe.lexer_state -> Lexing.lexbuf -> workspace
Input JSON data of type workspace
.
val write_workspace_list : Buffer.t -> workspace_list -> unit
Output a JSON value of type workspace_list
.
val string_of_workspace_list : ?len:int -> workspace_list -> string
Serialize a value of type workspace_list
into a JSON string.
val read_workspace_list :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
workspace_list
Input JSON data of type workspace_list
.
val workspace_list_of_string : string -> workspace_list
Deserialize JSON data of type workspace_list
.
val read_uid : Yojson.Safe.lexer_state -> Lexing.lexbuf -> uid
Input JSON data of type uid
.
val read_tid : Yojson.Safe.lexer_state -> Lexing.lexbuf -> tid
Input JSON data of type tid
.
val read_pid : Yojson.Safe.lexer_state -> Lexing.lexbuf -> pid
Input JSON data of type pid
.
val write_time_entry : Buffer.t -> time_entry -> unit
Output a JSON value of type time_entry
.
val string_of_time_entry : ?len:int -> time_entry -> string
Serialize a value of type time_entry
into a JSON string.
val read_time_entry : Yojson.Safe.lexer_state -> Lexing.lexbuf -> time_entry
Input JSON data of type time_entry
.
val time_entry_of_string : string -> time_entry
Deserialize JSON data of type time_entry
.
val write_time_entry_list : Buffer.t -> time_entry_list -> unit
Output a JSON value of type time_entry_list
.
val string_of_time_entry_list : ?len:int -> time_entry_list -> string
Serialize a value of type time_entry_list
into a JSON string.
val read_time_entry_list :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
time_entry_list
Input JSON data of type time_entry_list
.
val time_entry_list_of_string : string -> time_entry_list
Deserialize JSON data of type time_entry_list
.
val string_of_tid_list : ?len:int -> tid_list -> string
Serialize a value of type tid_list
into a JSON string.
val read_tid_list : Yojson.Safe.lexer_state -> Lexing.lexbuf -> tid_list
Input JSON data of type tid_list
.
val string_of_project : ?len:int -> project -> string
Serialize a value of type project
into a JSON string.
val read_project : Yojson.Safe.lexer_state -> Lexing.lexbuf -> project
Input JSON data of type project
.
val write_project_list : Buffer.t -> project_list -> unit
Output a JSON value of type project_list
.
val string_of_project_list : ?len:int -> project_list -> string
Serialize a value of type project_list
into a JSON string.
val read_project_list :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
project_list
Input JSON data of type project_list
.
val project_list_of_string : string -> project_list
Deserialize JSON data of type project_list
.
val string_of_pid_list : ?len:int -> pid_list -> string
Serialize a value of type pid_list
into a JSON string.
val read_pid_list : Yojson.Safe.lexer_state -> Lexing.lexbuf -> pid_list
Input JSON data of type pid_list
.
val write_data_time_entry : Buffer.t -> data_time_entry -> unit
Output a JSON value of type data_time_entry
.
val string_of_data_time_entry : ?len:int -> data_time_entry -> string
Serialize a value of type data_time_entry
into a JSON string.
val read_data_time_entry :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
data_time_entry
Input JSON data of type data_time_entry
.
val data_time_entry_of_string : string -> data_time_entry
Deserialize JSON data of type data_time_entry
.
val write_data_project : Buffer.t -> data_project -> unit
Output a JSON value of type data_project
.
val string_of_data_project : ?len:int -> data_project -> string
Serialize a value of type data_project
into a JSON string.
val read_data_project :
Yojson.Safe.lexer_state ->
Lexing.lexbuf ->
data_project
Input JSON data of type data_project
.
val data_project_of_string : string -> data_project
Deserialize JSON data of type data_project
.