{"id":15233414,"url":"https://github.com/sysbot-org/tgscraper","last_synced_at":"2025-07-05T13:35:10.086Z","repository":{"id":37526103,"uuid":"182874495","full_name":"Sysbot-org/tgscraper","owner":"Sysbot-org","description":"A PHP library used to extract JSON data (and auto-generate PHP classes) from Telegram bot API documentation page.","archived":false,"fork":false,"pushed_at":"2024-08-25T16:58:34.000Z","size":671,"stargazers_count":22,"open_issues_count":0,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T06:51:31.952Z","etag":null,"topics":["bot-api","json-schema","openapi","php","php-code-generator","php-framework","schema-generation","telegram","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"https://tgscraper.sys001.xyz/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sysbot-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-22T22:00:18.000Z","updated_at":"2025-02-02T11:56:13.000Z","dependencies_parsed_at":"2024-05-06T16:05:14.425Z","dependency_job_id":"96f71fb6-8f78-41e3-9178-4d8e148f2d06","html_url":"https://github.com/Sysbot-org/tgscraper","commit_stats":{"total_commits":53,"total_committers":4,"mean_commits":13.25,"dds":0.07547169811320753,"last_synced_commit":"b15594076fb49a7b242a1459a9a62df4b3dde738"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sysbot-org%2Ftgscraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sysbot-org%2Ftgscraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sysbot-org%2Ftgscraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sysbot-org%2Ftgscraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sysbot-org","download_url":"https://codeload.github.com/Sysbot-org/tgscraper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248162977,"owners_count":21057848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot-api","json-schema","openapi","php","php-code-generator","php-framework","schema-generation","telegram","telegram-bot","telegram-bot-api"],"created_at":"2024-09-29T05:08:42.472Z","updated_at":"2025-04-10T05:31:02.654Z","avatar_url":"https://github.com/Sysbot-org.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TGScraper\n\n[![License](http://poser.pugx.org/sysbot/tgscraper/license)](https://packagist.org/packages/sysbot/tgscraper)\n![Required PHP Version](https://img.shields.io/badge/php-%E2%89%A58.0-brightgreen)\n[![Latest Stable Version](http://poser.pugx.org/sysbot/tgscraper/v)](https://packagist.org/packages/sysbot/tgscraper)\n[![Dependencies](https://img.shields.io/librariesio/github/Sysbot-org/tgscraper)](https://libraries.io/github/Sysbot-org/tgscraper)\n[![Code Quality](https://img.shields.io/scrutinizer/quality/g/Sysbot-org/tgscraper)](https://scrutinizer-ci.com/g/Sysbot-org/tgscraper/?branch=master)\n\nA PHP library used to extract JSON data (and auto-generate PHP classes)\nfrom [Telegram bot API documentation page](https://core.telegram.org/bots/api).\n\n## Changelog\n\nInterested in recent changes? Have a look [here](CHANGELOG.md)!\n\n\n## Installation\n\nInstall the library with composer:\n\n```bash \n  $ composer require sysbot/tgscraper --prefer-stable\n```\n\n(Optional) Install the cache package:\n\n```bash \n  $ composer require sysbot/tgscraper-cache\n```\n\n## Using from command line\n\nOnce installed, you can use the CLI to interact with the library.\n\nFor basic help and command list:\n\n```bash \n  $ vendor/bin/tgscraper help\n```\n\n### JSON\n\nExtract the latest schema in a human-readable JSON:\n\n```bash \n  $ vendor/bin/tgscraper app:export-schema --readable botapi.json\n```\n\nOr, if you want a Postman-compatible JSON (thanks to [davtur19](https://github.com/davtur19/TuriBotGen/blob/master/postman.php)):\n\n```bash \n  $ vendor/bin/tgscraper app:export-schema --postman botapi_postman.json\n```\n\n### YAML\n\nExtract the latest schema in YAML format:\n\n```bash \n  $ vendor/bin/tgscraper app:export-schema --yaml botapi.yaml\n```\n\n### OpenAPI\n\nExtract the latest OpenAPI schema in JSON format:\n\n```bash \n  $ vendor/bin/tgscraper app:export-schema --openapi botapi_openapi.json\n```\n\nOr, if you prefer YAML:\n\n```bash \n  $ vendor/bin/tgscraper app:export-schema --openapi --yaml botapi_openapi.yaml\n```\n\n### Stubs\n\n_Note: since Telegram may change the page format at any time, do **NOT** rely on the automagically generated\nstubs from this library, **ALWAYS** review the code!_\n\nTGScraper can also generate class stubs that you can use in your library. A sample implementation is available in the [Sysbot Telegram module](https://github.com/Sysbot-org/Sysbot-tg).\n\nCreate stubs in the `out/` directory using `Sysbot\\Telegram` as namespace prefix:\n\n```bash \n  $ vendor/bin/tgscraper app:create-stubs --namespace-prefix \"Sysbot\\Telegram\" out\n```\n\n### All versions\n\nIf you want to generate all schemas and stubs for every Bot API version, you can!\n\nHere's an example on how to export everything to the `out/` directory, with schemas in human-readable format and using `Sysbot\\Telegram` as namespace prefix for the stubs:\n\n```bash \n  $ vendor/bin/tgscraper app:dump-schemas -r --namespace-prefix \"Sysbot\\Telegram\" out\n```\n\n## Custom format\n\nIf you're interested in the custom format generated by TGScraper, you can find its schema [here](docs/schema.json).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysbot-org%2Ftgscraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysbot-org%2Ftgscraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysbot-org%2Ftgscraper/lists"}