Class BotApi.

package Default

 Methods

__construct()

__construct(\TgBotApi\BotApiBase\string $botKey, \TgBotApi\BotApiBase\ApiClientInterface $apiClient, \TgBotApi\BotApiBase\NormalizerInterface $normalizer, \TgBotApi\BotApiBase\string $endPoint = 'https://api.telegram.org'

Parameters

$botKey

$apiClient

$normalizer

$endPoint

add()

add(\TgBotApi\BotApiBase\Method\Interfaces\AddMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\AddMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

answer()

answer(\TgBotApi\BotApiBase\Method\Interfaces\AnswerMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\AnswerMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

call()

call(\TgBotApi\BotApiBase\Method\Interfaces\MethodInterface $method, \TgBotApi\BotApiBase\string $type = null) : mixed
inherited_from \TgBotApi\BotApiBase\BotApiInterface::call()

Parameters

$method

$type

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

mixed

call()

call(\TgBotApi\BotApiBase\Method\Interfaces\MethodInterface $method, $type = null) : mixed
Inherited

Parameters

$method

$type

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

mixed

close()

close(\TgBotApi\BotApiBase\Method\CloseMethod $method) 

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

copyMessage()

copyMessage(\TgBotApi\BotApiBase\Method\CopyMessageMethod $method) 

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

create()

create(\TgBotApi\BotApiBase\Method\Interfaces\CreateMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\CreateMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

delete()

delete(\TgBotApi\BotApiBase\Method\Interfaces\DeleteMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\DeleteMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

edit()

edit(\TgBotApi\BotApiBase\Method\Interfaces\EditMethodAliasInterface $method) : \TgBotApi\BotApiBase\Type\MessageType
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\EditMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

\TgBotApi\BotApiBase\Type\MessageType| bool

forward()

forward(\TgBotApi\BotApiBase\Method\Interfaces\ForwardMethodAliasInterface $method) : \TgBotApi\BotApiBase\Type\MessageType
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\ForwardMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

\TgBotApi\BotApiBase\Type\MessageType

getAbsoluteFilePath()

getAbsoluteFilePath(\TgBotApi\BotApiBase\Type\FileType $file) 
inherited_from \TgBotApi\BotApiBase\BotApiInterface::getAbsoluteFilePath()

Parameters

$file

getChat()

getChat(\TgBotApi\BotApiBase\Method\GetChatMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getChatAdministrators()

getChatAdministrators(\TgBotApi\BotApiBase\Method\GetChatAdministratorsMethod $method) : array<mixed,\TgBotApi\BotApiBase\Type\ChatMemberType>
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

array<mixed,\TgBotApi\BotApiBase\Type\ChatMemberType>

getChatMember()

getChatMember(\TgBotApi\BotApiBase\Method\GetChatMemberMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getChatMembersCount()

getChatMembersCount(\TgBotApi\BotApiBase\Method\GetChatMembersCountMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getFile()

getFile(\TgBotApi\BotApiBase\Method\GetFileMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getGameHighScores()

getGameHighScores(\TgBotApi\BotApiBase\Method\GetGameHighScoresMethod $method) : array<mixed,\TgBotApi\BotApiBase\Type\GameHighScoreType>
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

array<mixed,\TgBotApi\BotApiBase\Type\GameHighScoreType>

getMe()

getMe(\TgBotApi\BotApiBase\Method\GetMeMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getMyCommands()

getMyCommands(\TgBotApi\BotApiBase\Method\GetMyCommandsMethod $method) : array<mixed,\TgBotApi\BotApiBase\Type\BotCommandType>
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

array<mixed,\TgBotApi\BotApiBase\Type\BotCommandType>

getStickerSet()

getStickerSet(\TgBotApi\BotApiBase\Method\GetStickerSetMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getUpdates()

getUpdates(\TgBotApi\BotApiBase\Method\GetUpdatesMethod $method) : array<mixed,\TgBotApi\BotApiBase\Type\UpdateType>
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

array<mixed,\TgBotApi\BotApiBase\Type\UpdateType>

getUserProfilePhotos()

getUserProfilePhotos(\TgBotApi\BotApiBase\Method\GetUserProfilePhotosMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

getWebhookInfo()

getWebhookInfo(\TgBotApi\BotApiBase\Method\GetWebhookInfoMethod $method) 
Inherited

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

kick()

kick(\TgBotApi\BotApiBase\Method\Interfaces\KickMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\KickMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

leave()

leave(\TgBotApi\BotApiBase\Method\Interfaces\LeaveMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\LeaveMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

logOut()

logOut(\TgBotApi\BotApiBase\Method\LogOutMethod $method) 

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

pin()

pin(\TgBotApi\BotApiBase\Method\Interfaces\PinMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\PinMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

promote()

promote(\TgBotApi\BotApiBase\Method\Interfaces\PromoteMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\PromoteMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

restrict()

restrict(\TgBotApi\BotApiBase\Method\Interfaces\RestrictMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\RestrictMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

send()

send(\TgBotApi\BotApiBase\Method\Interfaces\SendMethodAliasInterface $method) : \TgBotApi\BotApiBase\Type\MessageType
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\SendMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

\TgBotApi\BotApiBase\Type\MessageType

sendChatAction()

sendChatAction(\TgBotApi\BotApiBase\Method\SendChatActionMethod $method) 
inherited_from \TgBotApi\BotApiBase\BotApiInterface::sendChatAction()

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

sendMediaGroup()

sendMediaGroup(\TgBotApi\BotApiBase\Method\SendMediaGroupMethod $method) : array<mixed,\TgBotApi\BotApiBase\Type\MessageType>
inherited_from \TgBotApi\BotApiBase\BotApiInterface::sendMediaGroup()

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

array<mixed,\TgBotApi\BotApiBase\Type\MessageType>

set()

set(\TgBotApi\BotApiBase\Method\Interfaces\SetMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\SetMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

stop()

stop(\TgBotApi\BotApiBase\Method\Interfaces\StopMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\StopMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

stopPoll()

stopPoll(\TgBotApi\BotApiBase\Method\StopPollMethod $method) 

Parameters

$method

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

unban()

unban(\TgBotApi\BotApiBase\Method\Interfaces\UnbanMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\UnbanMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

unpin()

unpin(\TgBotApi\BotApiBase\Method\Interfaces\UnpinMethodAliasInterface $method) : boolean
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\UnpinMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

boolean

upload()

upload(\TgBotApi\BotApiBase\Method\Interfaces\UploadMethodAliasInterface $method) : \TgBotApi\BotApiBase\Type\FileType
Inherited

Parameters

$method

\TgBotApi\BotApiBase\Method\Interfaces\UploadMethodAliasInterface

Exceptions

\TgBotApi\BotApiBase\Exception\ResponseException

Returns

\TgBotApi\BotApiBase\Type\FileType

getMethodName()

getMethodName($method) 

Parameters

$method

 Properties

 

$apiClient

$apiClient : \TgBotApi\BotApiBase\ApiClientInterface

Default

 

$botKey

$botKey : string

Default

 

$endPoint

$endPoint : string

Default

 

$normalizer

$normalizer : \TgBotApi\BotApiBase\NormalizerInterface

Default