tgbotlib/src/TgBotLib/Methods/GetWebhookInfo.php

36 lines
No EOL
817 B
PHP

<?php
namespace TgBotLib\Methods;
use TgBotLib\Abstracts\Method;
use TgBotLib\Bot;
use TgBotLib\Enums\Methods;
use TgBotLib\Objects\WebhookInfo;
class GetWebhookInfo extends Method
{
/**
* @inheritDoc
*/
public static function execute(Bot $bot, array $parameters = []): WebhookInfo
{
return WebhookInfo::fromArray(self::executeCurl(self::buildPost($bot, Methods::GET_WEBHOOK_INFO->value, $parameters)));
}
/**
* @inheritDoc
*/
public static function getRequiredParameters(): ?array
{
return null;
}
/**
* @inheritDoc
*/
public static function getOptionalParameters(): ?array
{
return null;
}
}