2017 © Pedro Peláez
 

library telegram-bot-api

Telegram Bot API Client

image

zelenin/telegram-bot-api

Telegram Bot API Client

  • Thursday, August 25, 2016
  • by zelenin
  • Repository
  • 8 Watchers
  • 51 Stars
  • 2,600 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 21 Forks
  • 2 Open issues
  • 14 Versions
  • 3 % Grown

The README.md

Telegram Bot API Client

Telegram Bot API Client., (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run, (*3)

php composer.phar require "zelenin/telegram-bot-api" "~1.0"

or add, (*4)

"zelenin/telegram-bot-api": "~1.0"

to the require section of your composer.json, (*5)

Usage

$api = ApiFactory::create($token);

try {
    $response = $api->sendMessage([
        'chat_id' => $chatId,
        'text' => 'Test message'
    ]);
    print_r($response);

    $response = $api->sendPhoto([
        'chat_id' => $myId,
        'photo' => fopen('/home/www/photo.jpg', 'r')
    ]);
    print_r($response);
} catch (\Zelenin\Telegram\Bot\Exception\NotOkException $e) {
    echo $e->getMessage();
}

See Bot API documentation for other methods., (*6)

Daemon

$api = ApiFactory::create($token);

$daemon = new \Zelenin\Telegram\Bot\Daemon\NaiveDaemon($api);

$daemon
    ->onUpdate(function (\Zelenin\Telegram\Bot\Type\Update $update) {
        print_r($update);
    });

$daemon->run();

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me, (*7)

The Versions

25/08 2016

dev-master

9999999-dev https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

25/08 2016

1.5.0

1.5.0.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

13/04 2016

1.0.0

1.0.0.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

13/04 2016

1.0.0-beta

1.0.0.0-beta https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

15/03 2016

0.0.10

0.0.10.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

13/03 2016

0.0.9

0.0.9.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

09/11 2015

0.0.8

0.0.8.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

07/10 2015

0.0.7

0.0.7.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

07/10 2015

0.0.6

0.0.6.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

07/10 2015

0.0.5

0.0.5.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

29/06 2015

0.0.4

0.0.4.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

27/06 2015

0.0.3

0.0.3.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

27/06 2015

0.0.2

0.0.2.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram

27/06 2015

0.0.1

0.0.1.0 https://github.com/zelenin/telegram-bot-api

Telegram Bot API Client

  Sources   Download

MIT

The Requires

 

api bot telegram