Auto-generated documentation website for tgbotrs.
Live docs: https://ankit-chaubey.github.io/tgbotrs/
Direct method links:
https://ankit-chaubey.github.io/tgbotrs/#method-send-message
https://ankit-chaubey.github.io/tgbotrs/#method-get-me
https://ankit-chaubey.github.io/tgbotrs/#method-forward-message
https://ankit-chaubey.github.io/tgbotrs/#method-answer-callback-query
- All methods with parameter tables, optional param structs, and copyable Rust examples
- All types with field-by-field breakdown
- Bot constructors:
new,with_api_url,with_timeout,with_client,new_unverified - Long polling with
Poller - Webhook server with
WebhookServer(axum,webhookfeature) - Framework:
Dispatcher,CommandHandler,MessageHandler,Updater, filters - Sync client:
SyncBot(client-ureqfeature) - Custom HTTP client:
BotClienttrait - Entity parsing:
MessageEntityExt,ParsedEntity - Error handling:
BotErrorvariants
Docs are deployed automatically to gh-pages on:
- Push to
main(whentgbotrs/src/**orscripts/**change) - Tag push matching
v* - GitHub Release published
- Manual workflow dispatch
To enable GitHub Pages:
- Repo Settings β Pages
- Source:
Deploy from a branch - Branch:
gh-pages - Save
git clone https://github.com/ankit-chaubey/tgbotrs-docs
cd tgbotrs-docs
python3 scripts/generate_docs.py
# open site/index.html in browserTo pull latest source files from the main repo before regenerating:
BASE=https://raw.githubusercontent.com/ankit-chaubey/tgbotrs/main/tgbotrs/src
for f in gen_methods.rs gen_types.rs bot.rs client.rs client_sync.rs \
entities.rs error.rs polling.rs webhook.rs types.rs; do
curl -sSL "$BASE/$f" -o "tgbotrs/src/$f"
done
python3 scripts/generate_docs.pytgbotrs-docs/
βββ .github/
β βββ workflows/
β βββ deploy-docs.yml # auto-deploy on push, tag, or release
βββ scripts/
β βββ generate_docs.py # doc generator (pure Python stdlib + optional bs4)
βββ tgbotrs/
β βββ src/
β βββ gen_methods.rs # auto-generated methods
β βββ gen_types.rs # auto-generated types
β βββ bot.rs
β βββ client.rs
β βββ client_sync.rs
β βββ entities.rs
β βββ error.rs
β βββ polling.rs
β βββ webhook.rs
β βββ types.rs
β βββ framework/
βββ site/
β βββ index.html # generated output
β βββ CNAME
βββ README.md
MIT - Copyright (c) 2024-present Ankit Chaubey