dev-master
9999999-devA wrapper for Telegram Bot API
MIT
The Requires
- php ^5.3.3 || ^7.0
- jms/serializer-bundle ^1.1
by Max Gorovenko
api php symfony2 bot symfony telegram telegram-bot telegram-api telegram-bot-api
A wrapper for Telegram Bot API
A wrapper bundle for Telegram Bot API compatible with Symfony framework. Uses JMS\Serializer for serialization and deserialization objects., (*1)
Via Composer, (*2)
``` bash $ composer require maxgorovenko/telegram-bot-api-bundle @dev, (*3)
#### For Symfony you have to upgrade your AppKernel and config: ```php # app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... // register the bundle here new \MG\TelegramBotApiBundle\MGTelegramBotApiBundle() ); } }
# app/config/config.yml mg_telegram_bot_api: token: xxxxx:yyyyyyyyyyyyyyyyyyyy
Look in JMS Serializer creating manual., (*4)
$botToken = '11111:2222222'; $serializer = JMS\Serializer\SerializerBuilder::create()->build(); $api = new MG\TelegramBotApiBundle\Service\Api($botToken, $serializer); $updates = $api->getUpdates();
$api = $container->get('mg.telegram_bot_api'); $updates = $api->getUpdates();
A wrapper for Telegram Bot API
MIT
api php symfony2 bot symfony telegram telegram-bot telegram-api telegram-bot-api