Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akalongman committed Jul 6, 2015
1 parent 80ce398 commit d756b2d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 49 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[![Join the chat at https://gitter.im/akalongman/php-telegram-bot](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/akalongman/php-telegram-bot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/akalongman/php-telegram-bot.svg?branch=master)](https://travis-ci.org/akalongman/kautilities)
[![Latest Stable Version](https://img.shields.io/packagist/v/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/php-telegram-bot)
[![Total Downloads](https://img.shields.io/packagist/dt/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/php-telegram-bot)
[![Downloads Month](https://img.shields.io/packagist/dm/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/php-telegram-bot)
[![License](https://img.shields.io/packagist/l/Longman/telegram-bot.svg)](https://packagist.org/packages/stichoza/longman/php-telegram-bot)
[![Latest Stable Version](https://img.shields.io/packagist/v/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
[![Total Downloads](https://img.shields.io/packagist/dt/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
[![Downloads Month](https://img.shields.io/packagist/dm/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)
[![License](https://img.shields.io/packagist/l/Longman/telegram-bot.svg)](https://packagist.org/packages/longman/telegram-bot)


A Telegram Bot based on the official [Telegram Bot API](https://core.telegram.org/bots/api)
Expand Down Expand Up @@ -76,7 +76,7 @@ Create composer.json file:
"name": "yourproject/yourproject",
"type": "project",
"require": {
"php": ">=5.3.0",
"php": ">=5.4.0",
"longman/telegram-bot": "*"
}
}
Expand All @@ -100,14 +100,14 @@ Create set.php and put:
```php
<?php

$loader = require \_\_DIR\_\_.'/vendor/autoload.php';
$loader = require __DIR__.'/vendor/autoload.php';

$API\_KEY = 'your\_bot\_api\_key';
$API_KEY = 'your_bot_api_key';
$BOT_NAME = 'namebot';

try {
// create Telegram API object
$telegram = new Longman\TelegramBot\Telegram($API\_KEY, $BOT\_NAME);
$telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);

// set webhook
echo $telegram->setWebHook('https://yourdomain/yourpath_to_hook.php');
Expand All @@ -123,9 +123,9 @@ After create hook.php and put:
```php
<?php

$loader = require \_\_DIR\_\_.'/vendor/autoload.php';
$loader = require __DIR__.'/vendor/autoload.php';

$API\_KEY = 'your\_bot\_api\_key';
$API_KEY = 'your_bot_api_key';
$BOT_NAME = 'namebot';

try {
Expand Down
79 changes: 40 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
{
"name": "longman/telegram-bot",
"type": "library",
"description": "PHP telegram bot",
"keywords": ["telegram", "bot", "api"],
"license": "MIT",
"homepage": "https://github.com/akalongman/php-telegram-bot",
"support": {
"issues": "https://github.com/akalongman/php-telegram-bot/issues",
"source": "https://github.com/akalongman/php-telegram-bot"
},
"authors": [
{
"name": "Avtandil Kikabidze aka LONGMAN",
"email": "akalongman@gmail.com",
"homepage": "http://longman.ge",
"role": "Developer"
}
],
"require": {
"php": ">=5.4.0",
"ext-pdo": "*",
"hoa/math": "~0.0"
},
"autoload": {
"psr-4": {
"Longman\\TelegramBot\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"require-dev": {
"phpunit/phpunit": "4.1.*",
"phpspec/phpspec": "~2.1",
"squizlabs/php_codesniffer": "2.3.*"
}
"name": "longman/telegram-bot",
"type": "library",
"description": "PHP telegram bot",
"keywords": ["telegram", "bot", "api"],
"license": "MIT",
"homepage": "https://github.com/akalongman/php-telegram-bot",
"support": {
"issues": "https://github.com/akalongman/php-telegram-bot/issues",
"source": "https://github.com/akalongman/php-telegram-bot"
},
"authors": [
{
"name": "Avtandil Kikabidze aka LONGMAN",
"email": "akalongman@gmail.com",
"homepage": "http://longman.ge",
"role": "Developer"
}
],
"require": {
"php": ">=5.4.0",
"ext-pdo": "*",
"ext-curl": "*",
"hoa/math": "~0.0"
},
"autoload": {
"psr-4": {
"Longman\\TelegramBot\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"require-dev": {
"phpunit/phpunit": "4.1.*",
"phpspec/phpspec": "~2.1",
"squizlabs/php_codesniffer": "2.3.*"
}
}

0 comments on commit d756b2d

Please sign in to comment.