EV::Telegram::TDLib examples
============================

Prerequisites
-------------
Get api_id and api_hash for your application at https://my.telegram.org
(API development tools). Credentials come from the environment, never
from source:

  TD_API_ID      application api_id
  TD_API_HASH    application api_hash
  TD_PHONE       phone number in international format (user login)
  TD_BOT_TOKEN   bot token from BotFather (bot login)
  TD_DATABASE_DIRECTORY  optional, overrides the default session directory

WARNING: the database directory holds the session. Whoever reads it owns
the account; treat it as exactly as sensitive as a password. Do not
commit it.

Run the examples from the distribution root, e.g.:

  perl -Mblib eg/01-login.pl

Scripts
-------
01-login.pl         user login (phone, code, 2FA); creates the session database
02-bot-echo.pl      bot login via token; echoes incoming text messages
03-list-chats.pl    loads the chat list and prints id and title per chat
04-send-message.pl  sends a markdown message and waits for real delivery
05-download-file.pl downloads a file id with progress percentage
06-raw-method.pl    raw send()/execute() for methods the mixins do not wrap
