for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace unreal4u\TelegramAPI\Telegram\Methods;
use Psr\Log\LoggerInterface;
use unreal4u\TelegramAPI\Abstracts\TelegramMethods;
use unreal4u\TelegramAPI\Abstracts\TelegramTypes;
use unreal4u\TelegramAPI\InternalFunctionality\TelegramRawData;
use unreal4u\TelegramAPI\Telegram\Types\Chat;
/**
* Use this method to get up to date information about the chat (current name of the user for one-on-one conversations,
* current username of a user, group or channel, etc.). Returns a Chat object on success.
*
* Objects defined as-is july 2016
* @see https://core.telegram.org/bots/api#getchat
*/
class GetChat extends TelegramMethods
{
* Unique identifier for the target chat or username of the target supergroup or channel (in the format
* @channelusername)
* @var string
public $chat_id = '';
public static function bindToObject(TelegramRawData $data, LoggerInterface $logger): TelegramTypes
return new Chat($data->getResult(), $logger);
}
public function getMandatoryFields(): array
return [
'chat_id',
];