{"id":20208511,"url":"https://github.com/dicrtarasov/yii2-telegram","last_synced_at":"2026-05-16T18:09:52.890Z","repository":{"id":56479733,"uuid":"245272909","full_name":"dicrtarasov/yii2-telegram","owner":"dicrtarasov","description":"Telegram API for Yii2","archived":false,"fork":false,"pushed_at":"2023-07-31T17:36:40.000Z","size":273,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-02T19:43:54.537Z","etag":null,"topics":["api","dicr","php","telegram","yii2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dicrtarasov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-05T21:38:27.000Z","updated_at":"2022-01-23T01:23:16.000Z","dependencies_parsed_at":"2025-09-02T19:40:22.352Z","dependency_job_id":"47aaf8d4-909c-4143-ad4d-f0f7a85d1093","html_url":"https://github.com/dicrtarasov/yii2-telegram","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/dicrtarasov/yii2-telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicrtarasov%2Fyii2-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicrtarasov%2Fyii2-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicrtarasov%2Fyii2-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicrtarasov%2Fyii2-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dicrtarasov","download_url":"https://codeload.github.com/dicrtarasov/yii2-telegram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicrtarasov%2Fyii2-telegram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33113515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","dicr","php","telegram","yii2"],"created_at":"2024-11-14T05:35:57.047Z","updated_at":"2026-05-16T18:09:52.863Z","avatar_url":"https://github.com/dicrtarasov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Telegram для Yii2\n\n- API https://core.telegram.org/bots/api\n\n## Настройка компонента\n\n```php\n$config = [\n    'components' =\u003e [\n        'telegram' =\u003e [\n            'class' =\u003e dicr\\telegram\\TelegramModule::class,\n            'botToken' =\u003e 'ваш токен'\n        ]\n    ]\n];\n```\n\n## Отправка запросов\n\n```php\nuse dicr\\telegram\\TelegramModule;\nuse dicr\\telegram\\request\\SendMessage;\n\n/** @var TelegramModule $module получаем модуль */\n$module = Yii::$app-\u003eget('telegram');\n\n/** @var SendMessage $request формируем запрос */\n$request = $module-\u003ecreateRequest([\n    'class' =\u003e SendMessage::class,\n    'chatId' =\u003e 'XXXXXXXXXXXXX',\n    'text' =\u003e 'Проверка сообщения'\n]);\n\n// отправка сообщения\n$response = $request-\u003esend();\n```\n\n## WebHook\n\nУстановить/удалить webhook можно из командной строки.\n\n```shell script\n# установить webHook\n/usr/bin/php yii.php telegram/command/webhook-set\n\n# проверить webhook\n/usr/bin/php yii.php telegram/command/webhook-info\n\n# удалить webhook\n/usr/bin/php yii.php telegram/command/webhook-delete\n```\n\nДля обработки обновлений через webhook нужно настроить функцию-обработчик в конфиге модуля:\n\n```php\nuse dicr\\telegram\\entity\\Update;\nuse dicr\\telegram\\TelegramModule;\n\n$config = [\n    'components' =\u003e [\n        'telegram' =\u003e [\n            'class' =\u003e dicr\\telegram\\TelegramModule::class,\n            'botToken' =\u003e 'ваш токен',\n            'handler' =\u003e static function(Update $update, TelegramModule $module) {\n                // обработка обновлений от webhook\n            }\n        ]\n    ]\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdicrtarasov%2Fyii2-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdicrtarasov%2Fyii2-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdicrtarasov%2Fyii2-telegram/lists"}