package telegraml

  1. Overview
  2. Docs

This module is used for downloadable files uploaded to the Telegram servers

type file = {
  1. file_id : string;
  2. file_size : int option;
  3. file_path : string option;
}

Represents the information returned by getFile for the file_id

val create : file_id:string -> ?file_size:int option -> ?file_path:string option -> unit -> file

Create a file in a concise manner

Read a file out of some JSON

val read : Yojson.Safe.json -> file

Read a file out of some JSON

val download : string -> file -> string Lwt.t option

Download the file from Telegram's servers if it exists