Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

VasuLabs/tgbotrs-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

tgbotrs-docs

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

What's documented

  • 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, webhook feature)
  • Framework: Dispatcher, CommandHandler, MessageHandler, Updater, filters
  • Sync client: SyncBot (client-ureq feature)
  • Custom HTTP client: BotClient trait
  • Entity parsing: MessageEntityExt, ParsedEntity
  • Error handling: BotError variants

Deploy

Docs are deployed automatically to gh-pages on:

  • Push to main (when tgbotrs/src/** or scripts/** change)
  • Tag push matching v*
  • GitHub Release published
  • Manual workflow dispatch

To enable GitHub Pages:

  1. Repo Settings β†’ Pages
  2. Source: Deploy from a branch
  3. Branch: gh-pages
  4. Save

Local generation

git clone https://github.com/ankit-chaubey/tgbotrs-docs
cd tgbotrs-docs

python3 scripts/generate_docs.py

# open site/index.html in browser

To 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.py

Project structure

tgbotrs-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

License

MIT - Copyright (c) 2024-present Ankit Chaubey

About

Auto-generated, interactive documentation website for tgbotrs πŸ¦€ The complete Telegram Bot API library for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors