Download the PHP package tg-bot-api/bot-api-base without Composer
On this page you can find all versions of the php package tg-bot-api/bot-api-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tg-bot-api/bot-api-base
More information about tg-bot-api/bot-api-base
Files in tg-bot-api/bot-api-base
Package bot-api-base
Short Description Clear and simple Telegram bot API
License MIT
Homepage https://github.com/tg-bot-api/telegram-bot-api
Informations about the package bot-api-base
Telegram Bot Api Base
Supported Telegram Bot API 5.0 (November 4, 2020)
Installation
Via Composer
Usage
We support all psr17 and psr18 implementations, but we will use guzzle6 for example
You can configure it to work in symfony, for example, in this way.
If you want to use your own api server - you can set url as 4th param in bot api
Allowed methods:
Method | Allowed type | response |
---|---|---|
add |
AddStickerToSetMethod | bool |
answer |
AnswerCallbackQueryMethod, AnswerInlineQueryMethod, AnswerPreCheckoutQueryMethod, AnswerShippingQueryMethod | bool |
create |
CreateNewStickerSetMethod | bool |
delete |
DeleteChatPhotoMethod, DeleteChatStickerSetMethod, DeleteMessageMethod, DeleteStickerFromSetMethod, DeleteWebhookMethod | bool |
edit |
EditMessageCaptionMethod, EditMessageLiveLocationMethod, EditMessageMediaMethod, EditMessageReplyMarkupMethod, EditMessageTextMethod | bool |
forward |
ForwardMessageMethod | MessageType |
kick |
KickChatMemberMethod | bool |
leave |
LeaveChatMethod | bool |
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, 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 |
unpin |
UnpinChatMessageMethod, UnpinAllChatMessagesMethod | bool |
upload |
UploadStickerFileMethod | FileType |
exportChatInviteLink |
ExportChatInviteLinkMethod | string |
sendChatAction |
SendChatActionMethod | bool |
getUpdates |
GetUpdatesMethod | UpdateType[] |
getMe |
GetMeMethod | UserType |
getMyCommands |
GetMyCommandsMethod | BotCommandType |
getUserProfilePhotos |
GetUserProfilePhotosMethod | UserProfilePhotosType |
getWebhookInfo |
GetWebhookInfoMethod | WebhookInfoType |
getChatMembersCount |
GetChatMembersCountMethod | int |
getChat |
GetChatMethod | ChatType |
getChatAdministrators |
GetChatAdministratorsMethod | ChatMemberType[] |
getChatMember |
GetChatMemberMethod | ChatMemberType |
getChatMenuButton |
GetChatMenuButtonMethod | MenuButtonType |
getGameHighScores |
GetGameHighScoresMethod | GameHighScoreType[] |
getStickerSet |
GetStickerSetMethod | StickerSetType |
getFile |
GetFileMethod | FileType |
sendMediaGroup |
SendMediaGroupMethod | MessageType[] |
getAbsoluteFilePath |
FileType | string |
logOut |
LogOutMethod | bool |
close |
CloseMethod | bool |
copyMessage |
CopyMessageMethod | MessageIdType |
call($method, [string $type]) |
any method class, [optional expected type] | array or excepted type object |
Implemented all methods and types referenced by official Api
You can use BotApiComplete
instance as helper to call
all methods from official Api like this:
Fetching webhooks
Method fetch()
of WebhookFetcher handling Psr\Http\Message\RequestInterface or string and always returns instance of UpdateType or throwing BadRequestException.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Greenplugin
- Big-Shark
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of bot-api-base with dependencies
ext-json Version *
phpdocumentor/reflection-docblock Version ^4.3|^5.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0
symfony/property-access Version ^3.4|^4.3|^5.0|^6.0
symfony/property-info Version ^3.4|^4.3|^5.0|^6.0
symfony/serializer Version ^3.4|^4.3|^5.0|^6.0
ext-fileinfo Version *