2017 © Pedro Peláez
 

library telegram-bot-api

A wrapper for Telegram Bot API

image

maxgorovenko/telegram-bot-api

A wrapper for Telegram Bot API

  • Sunday, May 29, 2016
  • by maxgorovenko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MGTelegramBotApiBundle

A wrapper bundle for Telegram Bot API compatible with Symfony framework. Uses JMS\Serializer for serialization and deserialization objects., (*1)

Install

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

Usage

Simple

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();

With symfony

$api = $container->get('mg.telegram_bot_api');
$updates = $api->getUpdates();

The Versions

29/05 2016

dev-master

9999999-dev

A wrapper for Telegram Bot API

  Sources   Download

MIT

The Requires

 

by Max Gorovenko

api php symfony2 bot symfony telegram telegram-bot telegram-api telegram-bot-api