Skip to content

Commit 7b038b0

Browse files
committed
api-docs
1 parent 003be01 commit 7b038b0

File tree

11 files changed

+408
-3
lines changed

11 files changed

+408
-3
lines changed

api-docs/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## telegram-bot-api
2-
> version 1.0.0, created by JPPM.
2+
> version 1.1.0, created by JPPM.
33
44

55
### Install
66
```
7-
jppm add telegram-bot-api@1.0.0
7+
jppm add telegram-bot-api@1.1.0
88
```
99

1010
### API
@@ -15,6 +15,14 @@ jppm add telegram-bot-api@1.0.0
1515
- [`TelegramError`](classes/telegram/exception/TelegramError.md)
1616
- [`TelegramException`](classes/telegram/exception/TelegramException.md)
1717

18+
#### `telegram\object\markup`
19+
20+
- [`AbstractMarkup`](classes/telegram/object/markup/AbstractMarkup.md)
21+
- [`TForceReply`](classes/telegram/object/markup/TForceReply.md)- _Shows reply interface to the user, as if they manually selected the bot‘s message and tapped 'Reply'_
22+
- [`TInlineKeyboard`](classes/telegram/object/markup/TInlineKeyboard.md)- _This object represents an inline keyboard that appears right next to the message it belongs to._
23+
- [`TReplyKeyboard`](classes/telegram/object/markup/TReplyKeyboard.md)- _This object represents a custom keyboard with reply options_
24+
- [`TReplyKeyboardRemove`](classes/telegram/object/markup/TReplyKeyboardRemove.md)- _Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button_
25+
1826
#### `telegram\object`
1927

2028
- [`TAudio`](classes/telegram/object/TAudio.md)
@@ -23,6 +31,7 @@ jppm add telegram-bot-api@1.0.0
2331
- [`TDocument`](classes/telegram/object/TDocument.md)
2432
- [`TFile`](classes/telegram/object/TFile.md)
2533
- [`TLocation`](classes/telegram/object/TLocation.md)
34+
- [`TMarkup`](classes/telegram/object/TMarkup.md)
2635
- [`TMessage`](classes/telegram/object/TMessage.md)
2736
- [`TMessageEntity`](classes/telegram/object/TMessageEntity.md)
2837
- [`TPhotoSize`](classes/telegram/object/TPhotoSize.md)
@@ -36,6 +45,7 @@ jppm add telegram-bot-api@1.0.0
3645

3746
#### `telegram\query`
3847

48+
- [`TAnswerCallbackQuery`](classes/telegram/query/TAnswerCallbackQuery.md)- _Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned._
3949
- [`TBaseQuery`](classes/telegram/query/TBaseQuery.md)
4050
- [`TEditMessageTextQuery`](classes/telegram/query/TEditMessageTextQuery.md)
4151
- [`TForwardMessageQuery`](classes/telegram/query/TForwardMessageQuery.md)

api-docs/classes/telegram/TelegramBotApi.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
- `->`[`kickChatMember()`](#method-kickchatmember)
3636
- `->`[`unbanChatMember()`](#method-unbanchatmember)
3737
- `->`[`getUpdates()`](#method-getupdates)
38+
- `->`[`answerCallbackQuery()`](#method-answercallbackquery)
3839
- `->`[`setProxy()`](#method-setproxy)
3940
- `->`[`getProxy()`](#method-getproxy)
4041
- `->`[`setToken()`](#method-settoken)
@@ -217,6 +218,15 @@ getUpdates(): TGetUpdatesQuery
217218

218219
---
219220

221+
<a name="method-answercallbackquery"></a>
222+
223+
### answerCallbackQuery()
224+
```php
225+
answerCallbackQuery(): TAnswerCallbackQuery
226+
```
227+
228+
---
229+
220230
<a name="method-setproxy"></a>
221231

222232
### setProxy()
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# TMarkup
2+
3+
- **class** `TMarkup` (`telegram\object\TMarkup`)
4+
- **source** `telegram/object/TMarkup.php`
5+
6+
---
7+
8+
#### Static Methods
9+
10+
- `TMarkup ::`[`replyKeyboard()`](#method-replykeyboard)
11+
- `TMarkup ::`[`inlineKeyboard()`](#method-inlinekeyboard)
12+
- `TMarkup ::`[`forceReply()`](#method-forcereply)
13+
- `TMarkup ::`[`removeKeyboard()`](#method-removekeyboard)
14+
15+
---
16+
# Static Methods
17+
18+
<a name="method-replykeyboard"></a>
19+
20+
### replyKeyboard()
21+
```php
22+
TMarkup::replyKeyboard(): TReplyKeyboard
23+
```
24+
25+
---
26+
27+
<a name="method-inlinekeyboard"></a>
28+
29+
### inlineKeyboard()
30+
```php
31+
TMarkup::inlineKeyboard(): TInlineKeyboard
32+
```
33+
34+
---
35+
36+
<a name="method-forcereply"></a>
37+
38+
### forceReply()
39+
```php
40+
TMarkup::forceReply(): TForceReply
41+
```
42+
43+
---
44+
45+
<a name="method-removekeyboard"></a>
46+
47+
### removeKeyboard()
48+
```php
49+
TMarkup::removeKeyboard(): TReplyKeyboardRemove
50+
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AbstractMarkup
2+
3+
- **class** `AbstractMarkup` (`telegram\object\markup\AbstractMarkup`)
4+
- **source** `telegram/object/markup/AbstractMarkup.php`
5+
6+
**Child Classes**
7+
8+
> [TForceReply](classes/telegram/object/markup/TForceReply.md), [TReplyKeyboard](classes/telegram/object/markup/TReplyKeyboard.md), [TReplyKeyboardRemove](classes/telegram/object/markup/TReplyKeyboardRemove.md)
9+
10+
---
11+
12+
#### Properties
13+
14+
- `->`[`markup`](#prop-markup) : `array`
15+
16+
---
17+
18+
#### Methods
19+
20+
- `->`[`getMarkup()`](#method-getmarkup)
21+
22+
---
23+
# Methods
24+
25+
<a name="method-getmarkup"></a>
26+
27+
### getMarkup()
28+
```php
29+
getMarkup(): array
30+
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# TForceReply
2+
3+
- **class** `TForceReply` (`telegram\object\markup\TForceReply`) **extends** [`AbstractMarkup`](classes/telegram/object/markup/AbstractMarkup.md)
4+
- **source** `telegram/object/markup/TForceReply.php`
5+
6+
**Description**
7+
8+
Shows reply interface to the user, as if they manually selected the bot‘s message and tapped 'Reply'
9+
10+
---
11+
12+
#### Methods
13+
14+
- `->`[`__construct()`](#method-__construct)
15+
- `->`[`setSelective()`](#method-setselective) - _Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message._
16+
- See also in the parent class [AbstractMarkup](classes/telegram/object/markup/AbstractMarkup.md)
17+
18+
---
19+
# Methods
20+
21+
<a name="method-__construct"></a>
22+
23+
### __construct()
24+
```php
25+
__construct(): void
26+
```
27+
28+
---
29+
30+
<a name="method-setselective"></a>
31+
32+
### setSelective()
33+
```php
34+
setSelective(bool $value): void
35+
```
36+
Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# TInlineKeyboard
2+
3+
- **class** `TInlineKeyboard` (`telegram\object\markup\TInlineKeyboard`) **extends** [`TReplyKeyboard`](classes/telegram/object/markup/TReplyKeyboard.md)
4+
- **source** `telegram/object/markup/TInlineKeyboard.php`
5+
6+
**Description**
7+
8+
This object represents an inline keyboard that appears right next to the message it belongs to.
9+
10+
11+
---
12+
13+
#### Methods
14+
15+
- `->`[`button()`](#method-button) - _Добавить кнопку_
16+
- `->`[`getMarkup()`](#method-getmarkup)
17+
- See also in the parent class [TReplyKeyboard](classes/telegram/object/markup/TReplyKeyboard.md)
18+
19+
---
20+
# Methods
21+
22+
<a name="method-button"></a>
23+
24+
### button()
25+
```php
26+
button(string $text): TInlineKeyboard
27+
```
28+
Добавить кнопку
29+
30+
---
31+
32+
<a name="method-getmarkup"></a>
33+
34+
### getMarkup()
35+
```php
36+
getMarkup(): array
37+
```
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# TReplyKeyboard
2+
3+
- **class** `TReplyKeyboard` (`telegram\object\markup\TReplyKeyboard`) **extends** [`AbstractMarkup`](classes/telegram/object/markup/AbstractMarkup.md)
4+
- **source** `telegram/object/markup/TReplyKeyboard.php`
5+
6+
**Child Classes**
7+
8+
> [TInlineKeyboard](classes/telegram/object/markup/TInlineKeyboard.md)
9+
10+
**Description**
11+
12+
This object represents a custom keyboard with reply options
13+
14+
15+
---
16+
17+
#### Properties
18+
19+
- `->`[`params`](#prop-params) : `array`
20+
- `->`[`buttons`](#prop-buttons) : `array` - _Кнопки_
21+
- `->`[`row`](#prop-row) : `int` - _Указатель текущей строки в кнопках_
22+
- *See also in the parent class* [AbstractMarkup](classes/telegram/object/markup/AbstractMarkup.md).
23+
24+
---
25+
26+
#### Methods
27+
28+
- `->`[`__construct()`](#method-__construct)
29+
- `->`[`row()`](#method-row) - _Добавить новую строку в панель кнопок_
30+
- `->`[`button()`](#method-button) - _Добавить кнопку_
31+
- `->`[`setResize()`](#method-setresize) - _Указывает клиенту подогнать высоту клавиатуры под количество кнопок_
32+
- `->`[`setOneTime()`](#method-setonetime) - _Указывает клиенту скрыть клавиатуру после использования (после нажатия на кнопку)._
33+
- `->`[`setSelective()`](#method-setselective)
34+
- `->`[`getMarkup()`](#method-getmarkup)
35+
- See also in the parent class [AbstractMarkup](classes/telegram/object/markup/AbstractMarkup.md)
36+
37+
---
38+
# Methods
39+
40+
<a name="method-__construct"></a>
41+
42+
### __construct()
43+
```php
44+
__construct(array $params): void
45+
```
46+
47+
---
48+
49+
<a name="method-row"></a>
50+
51+
### row()
52+
```php
53+
row(): TReplyKeyboard
54+
```
55+
Добавить новую строку в панель кнопок
56+
57+
---
58+
59+
<a name="method-button"></a>
60+
61+
### button()
62+
```php
63+
button(string $text): TReplyKeyboard
64+
```
65+
Добавить кнопку
66+
67+
---
68+
69+
<a name="method-setresize"></a>
70+
71+
### setResize()
72+
```php
73+
setResize(bool $value): TReplyKeyboard
74+
```
75+
Указывает клиенту подогнать высоту клавиатуры под количество кнопок
76+
(сделать её меньше, если кнопок мало и наоборот)
77+
78+
---
79+
80+
<a name="method-setonetime"></a>
81+
82+
### setOneTime()
83+
```php
84+
setOneTime(bool $value): TReplyKeyboard
85+
```
86+
Указывает клиенту скрыть клавиатуру после использования (после нажатия на кнопку).
87+
Её по-прежнему можно будет открыть через иконку в поле ввода сообщения.
88+
89+
---
90+
91+
<a name="method-setselective"></a>
92+
93+
### setSelective()
94+
```php
95+
setSelective(bool $value): TReplyKeyboard
96+
```
97+
98+
---
99+
100+
<a name="method-getmarkup"></a>
101+
102+
### getMarkup()
103+
```php
104+
getMarkup(): array
105+
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# TReplyKeyboardRemove
2+
3+
- **class** `TReplyKeyboardRemove` (`telegram\object\markup\TReplyKeyboardRemove`) **extends** [`AbstractMarkup`](classes/telegram/object/markup/AbstractMarkup.md)
4+
- **source** `telegram/object/markup/TReplyKeyboardRemove.php`
5+
6+
**Description**
7+
8+
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button
9+
10+
---
11+
12+
#### Methods
13+
14+
- `->`[`__construct()`](#method-__construct)
15+
- `->`[`setSelective()`](#method-setselective) - _Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message._
16+
- See also in the parent class [AbstractMarkup](classes/telegram/object/markup/AbstractMarkup.md)
17+
18+
---
19+
# Methods
20+
21+
<a name="method-__construct"></a>
22+
23+
### __construct()
24+
```php
25+
__construct(): void
26+
```
27+
28+
---
29+
30+
<a name="method-setselective"></a>
31+
32+
### setSelective()
33+
```php
34+
setSelective(bool $value): void
35+
```
36+
Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

0 commit comments

Comments
 (0)