wearesho-team / telegram-message-delivery
Message delivery Telegram integration
3.0.0
2023-07-03 15:27 UTC
Requires
- php: >=7.4
- horat1us/environment-config: ^1.5
- klev-o/telegram-bot-api: ^1.9
- wearesho-team/message-delivery: ^1.7
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-11-03 18:17:33 UTC
README
wearesho-team/telegram-message-delivery implementation of Delivery\ServiceInterface
Compatibility: tested on PHP 7.4, PHP 8.1
Installation
composer require wearesho-team/telegram-message-delivery:^2.0.0
Configuration
- ConfigInterface
- EnvironmentConfig
- TELEGRAM_BOT_KEY
- TELEGRAM_ENDPOINT (optional)
Usage
<?php use Wearesho\Delivery; /** @var \TgBotApi\BotApiBase\ApiClient $apiClient */ /** @var Delivery\Telegram\ConfigInterface $config */ $botApi = new Delivery\Telegram\BotApi( $config, $apiClient, new \TgBotApi\BotApiBase\BotApiNormalizer() ); $service = new Delivery\Telegram\Service($botApi); $service->send(new Delivery\Message('message content', 'chat id'));