for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CSlant\LaravelTelegramGitNotifier\Services;
use CSlant\TelegramGitNotifier\Exceptions\WebhookException;
use CSlant\TelegramGitNotifier\Webhook;
class WebhookService
{
protected Webhook $webhook;
public function __construct(?Webhook $webhook = null)
$this->webhook = $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 setWebhook(): string
return $this->webhook->setWebhook();
* Delete webhook for telegram bot.
public function deleteWebHook(): string
return $this->webhook->deleteWebHook();
* Get webhook update.
public function getUpdates(): string
return $this->webhook->getUpdates();
* Get webhook info.
public function getWebHookInfo(): string
return $this->webhook->getWebHookInfo();