Skip to content

Commit

Permalink
Merge pull request #28 from tg-bot-api/feature/#27-Bot-API-4.7
Browse files Browse the repository at this point in the history
Feature/#27 bot api 4.7
  • Loading branch information
greenplugin authored Mar 31, 2020
2 parents 1b1236e + c4fc253 commit bd5fabf
Show file tree
Hide file tree
Showing 287 changed files with 7,702 additions and 3,652 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
- Nothing
--->

## 1.4.0 - 2020-03-31

#### March 30, 2020
#### Bot API 4.7

### Added
- Added the method `sendDice` `send(SendDiceMethod)` for sending a dice message, which will have a random value from 1 to 6.
(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!)
- Added the field `dice` to the `MessageType` object.
- Added the method `getMyCommands` for getting the current list of the bot's commands.
- Added the method `setMyCommands` `set(SetMyCommandMethod)` for changing the list of the bot's commands
through the Bot API instead of @BotFather.
- Added the ability to create animated sticker sets by specifying the
parameter `tgsSticker` instead of `pngSticker` in the class `CreateNewStickerSetMethod`.
- Added the ability to add animated stickers to sets created by the bot by specifying
the parameter `tgsSticker` instead of `pngSticker` in the class `AddStickerToSetMethod`.
- Added the field `thumb` to the `StickerSetType` object.
- Added the ability to change thumbnails of sticker sets created by the bot
using the method `setStickerSetThumb` `set(SetStickerSetThumbMethod)`.

### Deprecated
- `AddStickerToSetMethod::create()` - please use `createStatic` or `createAnimated` methods
- `CreateNewStickerSetMethod::create()` - please use `createStatic` or `createAnimated` methods

## 1.3.3 - 2020-03-06

### Fixed
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ You can configure it to work in symfony, for example, in [this way](https://gist
|pin|PinChatMessageMethod|bool|
|promote|PromoteChatMemberMethod|bool|
|restrict|RestrictChatMemberMethod|bool|
|send|SendPhotoMethod, SendAudioMethod, SendDocumentMethod, SendVideoMethod, SendAnimationMethod, SendVoiceMethod, SendVideoNoteMethod, SendGameMethod, SendInvoiceMethod, SendLocationMethod, SendVenueMethod, SendContactMethod, SendStickerMethod, SendMessageMethod, SendPollMethod|MessageType|
|set|SetChatDescriptionMethod, SetChatPhotoMethod, SetChatStickerSetMethod, SetChatTitleMethod, SetGameScoreMethod, SetStickerPositionInSetMethod, SetWebhookMethod, SetPassportDataErrorsMethod, SetChatPermissionsMethod, SetChatAdministratorCustomTitleMethod|bool|
|send|SendPhotoMethod, SendAudioMethod, SendDocumentMethod, SendVideoMethod, SendAnimationMethod, SendVoiceMethod, SendVideoNoteMethod, SendGameMethod, SendInvoiceMethod, SendLocationMethod, SendVenueMethod, SendContactMethod, SendStickerMethod, SendMessageMethod, SendPollMethod, SendDiceMethod|MessageType|
|set|SetChatDescriptionMethod, SetChatPhotoMethod, SetChatStickerSetMethod, SetChatTitleMethod, SetGameScoreMethod, SetStickerPositionInSetMethod, SetWebhookMethod, SetPassportDataErrorsMethod, SetChatPermissionsMethod, SetChatAdministratorCustomTitleMethod, SetMyCommandMethod, SetStickerSetThumbMethod|bool|
|stop|StopMessageLiveLocationMethod|bool|
|stopPoll|StopPollMethod|Poll|
|unban|UnbanChatMemberMethod|bool|
Expand All @@ -74,6 +74,7 @@ You can configure it to work in symfony, for example, in [this way](https://gist
|sendChatAction|SendChatActionMethod|bool|
|getUpdates|GetUpdatesMethod|UpdateType[]|
|getMe|GetMeMethod|UserType|
|getMyCommands|GetMyCommandsMethod|BotCommandType|
|getUserProfilePhotos|GetUserProfilePhotosMethod|UserProfilePhotosType|
|getWebhookInfo|GetWebhookInfoMethod|WebhookInfoType|
|getChatMembersCount|GetChatMembersCountMethod|int|
Expand Down Expand Up @@ -145,7 +146,7 @@ If you discover any security related issues, please email wformps@gmail.com inst
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-php-v]: https://img.shields.io/travis/php-v/tg-bot-api/bot-api-base.svg?style=flat-square
[ico-bot-api]: https://img.shields.io/badge/Bot%20API-4.6-blue.svg?style=flat-square
[ico-bot-api]: https://img.shields.io/badge/Bot%20API-4.7-blue.svg?style=flat-square
[ico-version]: https://img.shields.io/packagist/v/tg-bot-api/bot-api-base.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/tg-bot-api/bot-api-base/master.svg?style=flat-square
Expand Down
2,036 changes: 1,060 additions & 976 deletions docs/api/classes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 20 additions & 58 deletions docs/api/classes/TgBotApi.BotApiBase.ApiClient.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
<span class="label label-info">619</span></a></li>
<span class="label label-info">796</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
<ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
<span class="label label-info">5</span></a></li>
<span class="label label-info">7</span></a></li>
</ul>
</li>
</ul></div>
Expand Down Expand Up @@ -129,24 +129,15 @@ <h2>ApiApiClient constructor.</h2>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$requestFactory</h4>
<code>\Psr\Http\Message\RequestFactoryInterface</code>
</div>
<div class="subelement argument">
<h4>$streamFactory</h4>
<code>\Psr\Http\Message\StreamFactoryInterface</code>
</div>
<div class="subelement argument">
<h4>$client</h4>
<code>\Psr\Http\Client\ClientInterface</code>
</div>
<div class="subelement argument"><h4>$requestFactory</h4></div>
<div class="subelement argument"><h4>$streamFactory</h4></div>
<div class="subelement argument"><h4>$client</h4></div>
</div></div>
</div>
<a id="method_send"></a><div class="element clickable method public method_send " data-toggle="collapse" data-target=".method_send .collapse" title="public">
<h2>send()
</h2>
<pre>send(string $method, \TgBotApi\BotApiBase\BotApiRequestInterface $apiRequest) : mixed</pre>
<pre>send(\TgBotApi\BotApiBase\string $method, \TgBotApi\BotApiBase\BotApiRequestInterface $apiRequest) : mixed</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
Expand All @@ -155,14 +146,8 @@ <h2>send()
<td>\TgBotApi\BotApiBase\ApiClientInterface::send()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$method</h4>
<code>string</code>
</div>
<div class="subelement argument">
<h4>$apiRequest</h4>
<code>\TgBotApi\BotApiBase\BotApiRequestInterface</code>
</div>
<div class="subelement argument"><h4>$method</h4></div>
<div class="subelement argument"><h4>$apiRequest</h4></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code>\Psr\Http\Client\ClientExceptionInterface</code></th>
Expand All @@ -175,7 +160,7 @@ <h3>Returns</h3>
<a id="method_setBotKey"></a><div class="element clickable method public method_setBotKey " data-toggle="collapse" data-target=".method_setBotKey .collapse" title="public">
<h2>setBotKey()
</h2>
<pre>setBotKey(string $botKey) </pre>
<pre>setBotKey(\TgBotApi\BotApiBase\string $botKey) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
Expand All @@ -184,16 +169,13 @@ <h2>setBotKey()
<td>\TgBotApi\BotApiBase\ApiClientInterface::setBotKey()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$botKey</h4>
<code>string</code>
</div>
<div class="subelement argument"><h4>$botKey</h4></div>
</div></div>
</div>
<a id="method_setEndpoint"></a><div class="element clickable method public method_setEndpoint " data-toggle="collapse" data-target=".method_setEndpoint .collapse" title="public">
<h2>setEndpoint()
</h2>
<pre>setEndpoint(string $endPoint) </pre>
<pre>setEndpoint(\TgBotApi\BotApiBase\string $endPoint) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
Expand All @@ -202,49 +184,39 @@ <h2>setEndpoint()
<td>\TgBotApi\BotApiBase\ApiClientInterface::setEndpoint()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$endPoint</h4>
<code>string</code>
</div>
<div class="subelement argument"><h4>$endPoint</h4></div>
</div></div>
</div>
<a id="method_createDataStream"></a><div class="element clickable method protected method_createDataStream " data-toggle="collapse" data-target=".method_createDataStream .collapse" title="protected">
<h2>createDataStream()
</h2>
<pre>createDataStream($boundary, $name, $value) : string</pre>
<pre>createDataStream($boundary, $name, $value) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$boundary</h4></div>
<div class="subelement argument"><h4>$name</h4></div>
<div class="subelement argument"><h4>$value</h4></div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_createFileStream"></a><div class="element clickable method protected method_createFileStream " data-toggle="collapse" data-target=".method_createFileStream .collapse" title="protected">
<h2>createFileStream()
</h2>
<pre>createFileStream($boundary, $name, \TgBotApi\BotApiBase\Type\InputFileType $file) : string</pre>
<pre>createFileStream($boundary, $name, \TgBotApi\BotApiBase\Type\InputFileType $file) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$boundary</h4></div>
<div class="subelement argument"><h4>$name</h4></div>
<div class="subelement argument">
<h4>$file</h4>
<code>\TgBotApi\BotApiBase\Type\InputFileType</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
<div class="subelement argument"><h4>$file</h4></div>
</div></div>
</div>
<a id="method_createStreamBody"></a><div class="element clickable method protected method_createStreamBody " data-toggle="collapse" data-target=".method_createStreamBody .collapse" title="protected">
<h2>createStreamBody()
</h2>
<pre>createStreamBody(mixed $boundary, \TgBotApi\BotApiBase\BotApiRequestInterface $request) : string</pre>
<pre>createStreamBody(mixed $boundary, \TgBotApi\BotApiBase\BotApiRequestInterface $request) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
Expand All @@ -253,28 +225,18 @@ <h3>Parameters</h3>
<h4>$boundary</h4>
<code>mixed</code>
</div>
<div class="subelement argument">
<h4>$request</h4>
<code>\TgBotApi\BotApiBase\BotApiRequestInterface</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
<div class="subelement argument"><h4>$request</h4></div>
</div></div>
</div>
<a id="method_generateUri"></a><div class="element clickable method protected method_generateUri " data-toggle="collapse" data-target=".method_generateUri .collapse" title="protected">
<h2>generateUri()
</h2>
<pre>generateUri(string $method) : string</pre>
<pre>generateUri(\TgBotApi\BotApiBase\string $method) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$method</h4>
<code>string</code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
<div class="subelement argument"><h4>$method</h4></div>
</div></div>
</div>
<h3>
Expand Down Expand Up @@ -336,7 +298,7 @@ <h3>Default</h3>
<div class="row"><footer class="span12">
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>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
generated on 2020-01-25T00:05:23+03:00.<br></footer></div>
generated on 2020-03-31T00:16:07+03:00.<br></footer></div>
</div>
</body>
</html>
6 changes: 3 additions & 3 deletions docs/api/classes/TgBotApi.BotApiBase.ApiClientInterface.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
<span class="label label-info">619</span></a></li>
<span class="label label-info">796</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
<ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
<span class="label label-info">5</span></a></li>
<span class="label label-info">7</span></a></li>
</ul>
</li>
</ul></div>
Expand Down Expand Up @@ -149,7 +149,7 @@ <h4>$endPoint</h4>
<div class="row"><footer class="span12">
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>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.9.0</a> and<br>
generated on 2020-01-25T00:05:23+03:00.<br></footer></div>
generated on 2020-03-31T00:16:07+03:00.<br></footer></div>
</div>
</body>
</html>
Loading

0 comments on commit bd5fabf

Please sign in to comment.