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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bot-api-base

Telegram Bot Api Base

Telegram bot api Latest Version on Packagist Coverage Status build Quality Score PHP Version >= 7.2 Symfony Recipe

Quality Gate Status Bugs Duplicated Lines (%) Security Rating

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:

Learn api

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

License

The MIT License (MIT). Please see License File for more information.


All versions of bot-api-base with dependencies

PHP Build Version
Package Version
Requires php Version >7.3
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 *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tg-bot-api/bot-api-base contains the following files

Loading the files please wait ....