class TelegramClient (View source)

Class TelegramClient.

Constants

BASE_BOT_URL

DEFAULT_FILE_UPLOAD_REQUEST_TIMEOUT

DEFAULT_VIDEO_UPLOAD_REQUEST_TIMEOUT

Methods

__construct( HttpClientInterface $httpClientHandler = null)

Instantiates a new TelegramClient object.

setHttpClientHandler( HttpClientInterface $httpClientHandler)

Sets the HTTP client handler.

getHttpClientHandler()

Returns the HTTP client handler.

string
getBaseBotUrl()

Returns the base Bot URL.

array
prepareRequest( TelegramRequest $request)

Prepares the API request for sending to the client handler.

sendRequest( TelegramRequest $request)

Send an API request and process the result.

Details

at line 41
__construct( HttpClientInterface $httpClientHandler = null)

Instantiates a new TelegramClient object.

Parameters

HttpClientInterface $httpClientHandler

at line 51
setHttpClientHandler( HttpClientInterface $httpClientHandler)

Sets the HTTP client handler.

Parameters

HttpClientInterface $httpClientHandler

at line 61
HttpClientInterface getHttpClientHandler()

Returns the HTTP client handler.

Return Value

HttpClientInterface

at line 71
string getBaseBotUrl()

Returns the base Bot URL.

Return Value

string

at line 83
array prepareRequest( TelegramRequest $request)

Prepares the API request for sending to the client handler.

Parameters

TelegramRequest $request

Return Value

array

at line 104
TelegramResponse sendRequest( TelegramRequest $request)

Send an API request and process the result.

Parameters

TelegramRequest $request

Return Value

TelegramResponse

Exceptions

TelegramSDKException