Class ApiClient.

package Default

 Methods

ApiApiClient constructor.

__construct(\Psr\Http\Message\RequestFactoryInterface $requestFactory, \Psr\Http\Message\StreamFactoryInterface $streamFactory, \Psr\Http\Client\ClientInterface $client) 

Parameters

$requestFactory

$streamFactory

$client

send()

send(\TgBotApi\BotApiBase\string $method, \TgBotApi\BotApiBase\BotApiRequestInterface $apiRequest) : mixed
inherited_from \TgBotApi\BotApiBase\ApiClientInterface::send()

Parameters

$method

$apiRequest

Exceptions

\Psr\Http\Client\ClientExceptionInterface

Returns

mixed

setBotKey()

setBotKey(\TgBotApi\BotApiBase\string $botKey) 
inherited_from \TgBotApi\BotApiBase\ApiClientInterface::setBotKey()

Parameters

$botKey

setEndpoint()

setEndpoint(\TgBotApi\BotApiBase\string $endPoint) 
inherited_from \TgBotApi\BotApiBase\ApiClientInterface::setEndpoint()

Parameters

$endPoint

createDataStream()

createDataStream($boundary, $name, $value) 

Parameters

$boundary

$name

$value

createFileStream()

createFileStream($boundary, $name, \TgBotApi\BotApiBase\Type\InputFileType $file) 

Parameters

$boundary

$name

$file

createStreamBody()

createStreamBody(mixed $boundary, \TgBotApi\BotApiBase\BotApiRequestInterface $request) 

Parameters

$boundary

mixed

$request

generateUri()

generateUri(\TgBotApi\BotApiBase\string $method) 

Parameters

$method

 Properties

 

$botKey

$botKey : string

Default

 

$client

$client : \Psr\Http\Client\ClientInterface

Default

 

$endPoint

$endPoint : string

Default

 

$requestFactory

$requestFactory : \Psr\Http\Message\RequestFactoryInterface

Default

 

$streamFactory

$streamFactory : \Psr\Http\Message\StreamFactoryInterface

Default