for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CSlant\TelegramGitNotifierApp\Http\Actions;
use CSlant\TelegramGitNotifier\Exceptions\WebhookException;
use CSlant\TelegramGitNotifier\Webhook;
class WebhookAction
{
protected string $token;
protected Webhook $webhook;
public function __construct()
$this->webhook = new Webhook();
$this->webhook->setToken(config('telegram-git-notifier.bot.token'));
$this->webhook->setUrl(config('telegram-git-notifier.app.url'));
}
/**
* Set webhook for telegram bot
*
* @return string
* @throws WebhookException
*/
public function set(): string
return $this->webhook->setWebhook();
* Delete webhook for telegram bot
public function delete(): string
return $this->webhook->deleteWebHook();
* Get webhook update
public function getUpdates(): string
return $this->webhook->getUpdates();