MCPcopy Index your code
hub / github.com/PaulSonOfLars/telegram-bot-api-spec

github.com/PaulSonOfLars/telegram-bot-api-spec @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
13 symbols 36 edges 1 files 0 documented · 0% updated 2d ago★ 140
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

telegram-bot-api-spec

This repo provides the necessary scripts to scrape the telegram bot api docs for method, types, and docstrings.

The main usecase of having this data is expected to be to generate automated libraries which follow the bot api documentation to the letter. Assuming the docs are correct, autogenerated libraries provide the following: - Easy to update. Simply re-generate the code using the new JSON spec. - Typo free. All methods/fields are guaranteed to be correct. - No missing fields. If its in the spec, its in your code!

The output of this script api.json, is formatted as such:

{
  "methods": {
    <method name> : {
      "name": // string, method name
      "href": // string, link to docs
      "returns": // array of string, possible return types
      "description": // array of string, documentation lines
      "fields": [
        {
          "name": // string, field name
          "types": // array of string, possible field types
          "required": // bool, whether field is required
          "description": // string, documentation for field
        },
        ...
      ], // array of fields
      "subtypes": // array of string, all the types that subtype this item (eg, InputMedia has subtypes InputMediaAnimation, InputMediaDocument etc)
      "subtype_of": // array of string, all the "parent" types of this type (eg, InputMediaAnimation is a subtype of InputMedia)
    },
    ...
  }, // map of method name -> method details
  "types": {
    <type name> : {
      "name": // string, type name
      "href": // string, link to docs
      "description": // array of string, documentation lines
      "fields": [
        {
          "name": // string, field name
          "types": // array of string, possible field types
          "required": // bool, whether field is required
          "description": // string, documentation for field
        },
        ...
      ], // array of type fields
    },
    ...  
  } // map of type name -> type details
}

Core symbols most depended-on inside this repo

Shape

Function 13

Languages

Python100%

Modules by API surface

scrape.py13 symbols

For agents

$ claude mcp add telegram-bot-api-spec \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page