module Chat:sig
..end
type
chat_type =
| |
Private |
|||
| |
Group |
|||
| |
Supergroup |
|||
| |
Channel |
(* |
Turn a string into a `chat_type`
| *) |
val read_type : string -> chat_type
type
chat = {
|
id : |
|
chat_type : |
|
title : |
|
username : |
|
first_name : |
|
last_name : |
Create a `chat` in a concise manner
val create : id:int ->
chat_type:chat_type ->
?title:string option ->
?username:string option ->
?first_name:string option ->
?last_name:string option -> unit -> chat
val read : Yojson.Safe.json -> chat