lambq / laravel-madeline-proto
为Laravel提供的第三方Telegram客户端库danog/MadelineProto的封装
0.0.3-beta
2024-01-23 03:31 UTC
Requires
- php: ^7.4|^8.2
- danog/madelineproto: ^8
Requires (Dev)
- phabel/phabel: ^1.0
This package is auto-updated.
Last update: 2024-09-23 05:22:38 UTC
README
第三方Telegram客户端库danog/MadelineProto的Laravel封装。
备注
这是一个从setiawanhu/laravel-madeline-proto分叉的包,我将其升级到最新版本,并重新发布
入门指南
将laravel-madeline-proto添加到项目依赖项中
composer require lambq/laravel-madeline-proto
然后发布telegram.php配置文件
php artisan vendor:publish --provider="Hu\MadelineProto\MadelineProtoServiceProvider"
通过提供环境变量设置Telegram API密钥
MP_TELEGRAM_API_ID=... //your telegram api id here MP_TELEGRAM_API_HASH=... //your telegram api hash here
此封装包支持运行单个Telegram账户和多个Telegram账户。
深入了解
请查看wiki以获取关于laravel-madeline-proto使用的更多详细信息
备注
-
此封装包尚未封装所有API,我仍然专注于封装消息API。
-
如果您在Messages外观中找不到所需的方法或需要使用默认的danog/MadelineProto API,您可能想使用
MadelineProto::getClient()外观方法。它将返回danog\MadelineProto\API对象,您可以在其中调用danog/MadelineProto库提供的所有方法。
感谢
Bryan Ramaputra帮助我编写可读性强的文档。