Skip to content

Commit bd5fabf

Browse files
authored
Merge pull request #28 from tg-bot-api/feature/#27-Bot-API-4.7
Feature/#27 bot api 4.7
2 parents 1b1236e + c4fc253 commit bd5fabf

File tree

287 files changed

+7702
-3652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+7702
-3652
lines changed

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,30 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
2323
- Nothing
2424
--->
2525

26+
## 1.4.0 - 2020-03-31
27+
28+
#### March 30, 2020
29+
#### Bot API 4.7
30+
31+
### Added
32+
- Added the method `sendDice` `send(SendDiceMethod)` for sending a dice message, which will have a random value from 1 to 6.
33+
(Yes, we're aware of the “proper” singular of die. But it's awkward, and we decided to help it change One dice at a time!)
34+
- Added the field `dice` to the `MessageType` object.
35+
- Added the method `getMyCommands` for getting the current list of the bot's commands.
36+
- Added the method `setMyCommands` `set(SetMyCommandMethod)` for changing the list of the bot's commands
37+
through the Bot API instead of @BotFather.
38+
- Added the ability to create animated sticker sets by specifying the
39+
parameter `tgsSticker` instead of `pngSticker` in the class `CreateNewStickerSetMethod`.
40+
- Added the ability to add animated stickers to sets created by the bot by specifying
41+
the parameter `tgsSticker` instead of `pngSticker` in the class `AddStickerToSetMethod`.
42+
- Added the field `thumb` to the `StickerSetType` object.
43+
- Added the ability to change thumbnails of sticker sets created by the bot
44+
using the method `setStickerSetThumb` `set(SetStickerSetThumbMethod)`.
45+
46+
### Deprecated
47+
- `AddStickerToSetMethod::create()` - please use `createStatic` or `createAnimated` methods
48+
- `CreateNewStickerSetMethod::create()` - please use `createStatic` or `createAnimated` methods
49+
2650
## 1.3.3 - 2020-03-06
2751

2852
### Fixed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ You can configure it to work in symfony, for example, in [this way](https://gist
6363
|pin|PinChatMessageMethod|bool|
6464
|promote|PromoteChatMemberMethod|bool|
6565
|restrict|RestrictChatMemberMethod|bool|
66-
|send|SendPhotoMethod, SendAudioMethod, SendDocumentMethod, SendVideoMethod, SendAnimationMethod, SendVoiceMethod, SendVideoNoteMethod, SendGameMethod, SendInvoiceMethod, SendLocationMethod, SendVenueMethod, SendContactMethod, SendStickerMethod, SendMessageMethod, SendPollMethod|MessageType|
67-
|set|SetChatDescriptionMethod, SetChatPhotoMethod, SetChatStickerSetMethod, SetChatTitleMethod, SetGameScoreMethod, SetStickerPositionInSetMethod, SetWebhookMethod, SetPassportDataErrorsMethod, SetChatPermissionsMethod, SetChatAdministratorCustomTitleMethod|bool|
66+
|send|SendPhotoMethod, SendAudioMethod, SendDocumentMethod, SendVideoMethod, SendAnimationMethod, SendVoiceMethod, SendVideoNoteMethod, SendGameMethod, SendInvoiceMethod, SendLocationMethod, SendVenueMethod, SendContactMethod, SendStickerMethod, SendMessageMethod, SendPollMethod, SendDiceMethod|MessageType|
67+
|set|SetChatDescriptionMethod, SetChatPhotoMethod, SetChatStickerSetMethod, SetChatTitleMethod, SetGameScoreMethod, SetStickerPositionInSetMethod, SetWebhookMethod, SetPassportDataErrorsMethod, SetChatPermissionsMethod, SetChatAdministratorCustomTitleMethod, SetMyCommandMethod, SetStickerSetThumbMethod|bool|
6868
|stop|StopMessageLiveLocationMethod|bool|
6969
|stopPoll|StopPollMethod|Poll|
7070
|unban|UnbanChatMemberMethod|bool|
@@ -74,6 +74,7 @@ You can configure it to work in symfony, for example, in [this way](https://gist
7474
|sendChatAction|SendChatActionMethod|bool|
7575
|getUpdates|GetUpdatesMethod|UpdateType[]|
7676
|getMe|GetMeMethod|UserType|
77+
|getMyCommands|GetMyCommandsMethod|BotCommandType|
7778
|getUserProfilePhotos|GetUserProfilePhotosMethod|UserProfilePhotosType|
7879
|getWebhookInfo|GetWebhookInfoMethod|WebhookInfoType|
7980
|getChatMembersCount|GetChatMembersCountMethod|int|
@@ -145,7 +146,7 @@ If you discover any security related issues, please email [email protected] inst
145146
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
146147

147148
[ico-php-v]: https://img.shields.io/travis/php-v/tg-bot-api/bot-api-base.svg?style=flat-square
148-
[ico-bot-api]: https://img.shields.io/badge/Bot%20API-4.6-blue.svg?style=flat-square
149+
[ico-bot-api]: https://img.shields.io/badge/Bot%20API-4.7-blue.svg?style=flat-square
149150
[ico-version]: https://img.shields.io/packagist/v/tg-bot-api/bot-api-base.svg?style=flat-square
150151
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
151152
[ico-travis]: https://img.shields.io/travis/tg-bot-api/bot-api-base/master.svg?style=flat-square

docs/api/classes.svg

+1,060-976
Loading

docs/api/classes/TgBotApi.BotApiBase.ApiClient.html

+20-58
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">619</span></a></li>
36+
<span class="label label-info">796</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">5</span></a></li>
40+
<span class="label label-info">7</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -129,24 +129,15 @@ <h2>ApiApiClient constructor.</h2>
129129
<div class="row collapse"><div class="detail-description">
130130
<div class="long_description"></div>
131131
<h3>Parameters</h3>
132-
<div class="subelement argument">
133-
<h4>$requestFactory</h4>
134-
<code>\Psr\Http\Message\RequestFactoryInterface</code>
135-
</div>
136-
<div class="subelement argument">
137-
<h4>$streamFactory</h4>
138-
<code>\Psr\Http\Message\StreamFactoryInterface</code>
139-
</div>
140-
<div class="subelement argument">
141-
<h4>$client</h4>
142-
<code>\Psr\Http\Client\ClientInterface</code>
143-
</div>
132+
<div class="subelement argument"><h4>$requestFactory</h4></div>
133+
<div class="subelement argument"><h4>$streamFactory</h4></div>
134+
<div class="subelement argument"><h4>$client</h4></div>
144135
</div></div>
145136
</div>
146137
<a id="method_send"></a><div class="element clickable method public method_send " data-toggle="collapse" data-target=".method_send .collapse" title="public">
147138
<h2>send()
148139
</h2>
149-
<pre>send(string $method, \TgBotApi\BotApiBase\BotApiRequestInterface $apiRequest) : mixed</pre>
140+
<pre>send(\TgBotApi\BotApiBase\string $method, \TgBotApi\BotApiBase\BotApiRequestInterface $apiRequest) : mixed</pre>
150141
<div class="labels"></div>
151142
<div class="row collapse"><div class="detail-description">
152143
<div class="long_description"></div>
@@ -155,14 +146,8 @@ <h2>send()
155146
<td>\TgBotApi\BotApiBase\ApiClientInterface::send()</td>
156147
</tr></table>
157148
<h3>Parameters</h3>
158-
<div class="subelement argument">
159-
<h4>$method</h4>
160-
<code>string</code>
161-
</div>
162-
<div class="subelement argument">
163-
<h4>$apiRequest</h4>
164-
<code>\TgBotApi\BotApiBase\BotApiRequestInterface</code>
165-
</div>
149+
<div class="subelement argument"><h4>$method</h4></div>
150+
<div class="subelement argument"><h4>$apiRequest</h4></div>
166151
<h3>Exceptions</h3>
167152
<table class="table table-bordered"><tr>
168153
<th><code>\Psr\Http\Client\ClientExceptionInterface</code></th>
@@ -175,7 +160,7 @@ <h3>Returns</h3>
175160
<a id="method_setBotKey"></a><div class="element clickable method public method_setBotKey " data-toggle="collapse" data-target=".method_setBotKey .collapse" title="public">
176161
<h2>setBotKey()
177162
</h2>
178-
<pre>setBotKey(string $botKey) </pre>
163+
<pre>setBotKey(\TgBotApi\BotApiBase\string $botKey) </pre>
179164
<div class="labels"></div>
180165
<div class="row collapse"><div class="detail-description">
181166
<div class="long_description"></div>
@@ -184,16 +169,13 @@ <h2>setBotKey()
184169
<td>\TgBotApi\BotApiBase\ApiClientInterface::setBotKey()</td>
185170
</tr></table>
186171
<h3>Parameters</h3>
187-
<div class="subelement argument">
188-
<h4>$botKey</h4>
189-
<code>string</code>
190-
</div>
172+
<div class="subelement argument"><h4>$botKey</h4></div>
191173
</div></div>
192174
</div>
193175
<a id="method_setEndpoint"></a><div class="element clickable method public method_setEndpoint " data-toggle="collapse" data-target=".method_setEndpoint .collapse" title="public">
194176
<h2>setEndpoint()
195177
</h2>
196-
<pre>setEndpoint(string $endPoint) </pre>
178+
<pre>setEndpoint(\TgBotApi\BotApiBase\string $endPoint) </pre>
197179
<div class="labels"></div>
198180
<div class="row collapse"><div class="detail-description">
199181
<div class="long_description"></div>
@@ -202,49 +184,39 @@ <h2>setEndpoint()
202184
<td>\TgBotApi\BotApiBase\ApiClientInterface::setEndpoint()</td>
203185
</tr></table>
204186
<h3>Parameters</h3>
205-
<div class="subelement argument">
206-
<h4>$endPoint</h4>
207-
<code>string</code>
208-
</div>
187+
<div class="subelement argument"><h4>$endPoint</h4></div>
209188
</div></div>
210189
</div>
211190
<a id="method_createDataStream"></a><div class="element clickable method protected method_createDataStream " data-toggle="collapse" data-target=".method_createDataStream .collapse" title="protected">
212191
<h2>createDataStream()
213192
</h2>
214-
<pre>createDataStream($boundary, $name, $value) : string</pre>
193+
<pre>createDataStream($boundary, $name, $value) </pre>
215194
<div class="labels"></div>
216195
<div class="row collapse"><div class="detail-description">
217196
<div class="long_description"></div>
218197
<h3>Parameters</h3>
219198
<div class="subelement argument"><h4>$boundary</h4></div>
220199
<div class="subelement argument"><h4>$name</h4></div>
221200
<div class="subelement argument"><h4>$value</h4></div>
222-
<h3>Returns</h3>
223-
<div class="subelement response"><code>string</code></div>
224201
</div></div>
225202
</div>
226203
<a id="method_createFileStream"></a><div class="element clickable method protected method_createFileStream " data-toggle="collapse" data-target=".method_createFileStream .collapse" title="protected">
227204
<h2>createFileStream()
228205
</h2>
229-
<pre>createFileStream($boundary, $name, \TgBotApi\BotApiBase\Type\InputFileType $file) : string</pre>
206+
<pre>createFileStream($boundary, $name, \TgBotApi\BotApiBase\Type\InputFileType $file) </pre>
230207
<div class="labels"></div>
231208
<div class="row collapse"><div class="detail-description">
232209
<div class="long_description"></div>
233210
<h3>Parameters</h3>
234211
<div class="subelement argument"><h4>$boundary</h4></div>
235212
<div class="subelement argument"><h4>$name</h4></div>
236-
<div class="subelement argument">
237-
<h4>$file</h4>
238-
<code>\TgBotApi\BotApiBase\Type\InputFileType</code>
239-
</div>
240-
<h3>Returns</h3>
241-
<div class="subelement response"><code>string</code></div>
213+
<div class="subelement argument"><h4>$file</h4></div>
242214
</div></div>
243215
</div>
244216
<a id="method_createStreamBody"></a><div class="element clickable method protected method_createStreamBody " data-toggle="collapse" data-target=".method_createStreamBody .collapse" title="protected">
245217
<h2>createStreamBody()
246218
</h2>
247-
<pre>createStreamBody(mixed $boundary, \TgBotApi\BotApiBase\BotApiRequestInterface $request) : string</pre>
219+
<pre>createStreamBody(mixed $boundary, \TgBotApi\BotApiBase\BotApiRequestInterface $request) </pre>
248220
<div class="labels"></div>
249221
<div class="row collapse"><div class="detail-description">
250222
<div class="long_description"></div>
@@ -253,28 +225,18 @@ <h3>Parameters</h3>
253225
<h4>$boundary</h4>
254226
<code>mixed</code>
255227
</div>
256-
<div class="subelement argument">
257-
<h4>$request</h4>
258-
<code>\TgBotApi\BotApiBase\BotApiRequestInterface</code>
259-
</div>
260-
<h3>Returns</h3>
261-
<div class="subelement response"><code>string</code></div>
228+
<div class="subelement argument"><h4>$request</h4></div>
262229
</div></div>
263230
</div>
264231
<a id="method_generateUri"></a><div class="element clickable method protected method_generateUri " data-toggle="collapse" data-target=".method_generateUri .collapse" title="protected">
265232
<h2>generateUri()
266233
</h2>
267-
<pre>generateUri(string $method) : string</pre>
234+
<pre>generateUri(\TgBotApi\BotApiBase\string $method) </pre>
268235
<div class="labels"></div>
269236
<div class="row collapse"><div class="detail-description">
270237
<div class="long_description"></div>
271238
<h3>Parameters</h3>
272-
<div class="subelement argument">
273-
<h4>$method</h4>
274-
<code>string</code>
275-
</div>
276-
<h3>Returns</h3>
277-
<div class="subelement response"><code>string</code></div>
239+
<div class="subelement argument"><h4>$method</h4></div>
278240
</div></div>
279241
</div>
280242
<h3>
@@ -336,7 +298,7 @@ <h3>Default</h3>
336298
<div class="row"><footer class="span12">
337299
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
338300
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
339-
generated on 2020-01-25T00:05:23+03:00.<br></footer></div>
301+
generated on 2020-03-31T00:16:07+03:00.<br></footer></div>
340302
</div>
341303
</body>
342304
</html>

docs/api/classes/TgBotApi.BotApiBase.ApiClientInterface.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
3434
Reports <b class="caret"></b></a><ul class="dropdown-menu">
3535
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
36-
<span class="label label-info">619</span></a></li>
36+
<span class="label label-info">796</span></a></li>
3737
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
3838
<ul></ul></a></li>
3939
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
40-
<span class="label label-info">5</span></a></li>
40+
<span class="label label-info">7</span></a></li>
4141
</ul>
4242
</li>
4343
</ul></div>
@@ -149,7 +149,7 @@ <h4>$endPoint</h4>
149149
<div class="row"><footer class="span12">
150150
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
151151
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
152-
generated on 2020-01-25T00:05:23+03:00.<br></footer></div>
152+
generated on 2020-03-31T00:16:07+03:00.<br></footer></div>
153153
</div>
154154
</body>
155155
</html>

0 commit comments

Comments
 (0)