Свойство | Тип | Описание | |
---|---|---|---|
$body | The raw body of the response from API request. | ||
$decodedBody | The decoded body of the API response. | ||
$endPoint | API Endpoint used to make the request. | ||
$headers | The headers returned from API request. | ||
$httpStatusCode | The HTTP status code response from API. | ||
$request | The original request that returned this response. | ||
$thrownException | The exception thrown by this request. |
Метод | Описание | |
---|---|---|
__construct ( Telegram\Bot\TelegramRequest $request, Psr\Http\Message\ResponseInterface | GuzzleHttp\Promise\PromiseInterface $response ) | Gets the relevant data from the Http client. | |
decodeBody ( ) | Converts raw API response to proper decoded response. | |
getAccessToken ( ) : string | null | Return the bot access token that was used for this request. | |
getBody ( ) : string | Return the raw body response. | |
getDecodedBody ( ) : array | Return the decoded body response. | |
getEndpoint ( ) : string | Gets the Request Endpoint used to get the response. | |
getHeaders ( ) : array | Return the HTTP headers for this response. | |
getHttpStatusCode ( ) : null | integer | Gets the HTTP status code. | |
getRequest ( ) : Telegram\Bot\TelegramRequest | Return the original request that returned this response. | |
getResult ( ) : mixed | Helper function to return the payload of a successful response. | |
getThrownException ( ) : Telegram\Bot\Exceptions\TelegramSDKException | Returns the exception that was thrown for this request. | |
isError ( ) : boolean | Checks if response is an error. | |
makeException ( ) | Instantiates an exception to be thrown later. | |
throwException ( ) | Throws the exception. |
public __construct ( Telegram\Bot\TelegramRequest $request, Psr\Http\Message\ResponseInterface | GuzzleHttp\Promise\PromiseInterface $response ) | ||
$request | Telegram\Bot\TelegramRequest | |
$response | Psr\Http\Message\ResponseInterface | GuzzleHttp\Promise\PromiseInterface |
public decodeBody ( ) |
public getAccessToken ( ) : string | null | ||
Результат | string | null |
public getDecodedBody ( ) : array | ||
Результат | array |
public getEndpoint ( ) : string | ||
Результат | string |
public getHeaders ( ) : array | ||
Результат | array |
public getHttpStatusCode ( ) : null | integer | ||
Результат | null | integer |
public getRequest ( ) : Telegram\Bot\TelegramRequest | ||
Результат | Telegram\Bot\TelegramRequest |
public getThrownException ( ) : Telegram\Bot\Exceptions\TelegramSDKException | ||
Результат | Telegram\Bot\Exceptions\TelegramSDKException |
public makeException ( ) |
protected $httpStatusCode |