Interface WebhookBot
-
public interface WebhookBot
- Version:
- 1.0
- Author:
- Ruben Bermudez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getBotPath()
Gets in the url for the webhookString
getBotToken()
Gets bot token to access Telegram APIString
getBotUsername()
Gets bot username of this botBotApiMethod
onWebhookUpdateReceived(Update update)
This method is called when receiving updates via webhookvoid
setWebhook(String url, String publicCertificatePath)
Execute setWebhook method to set up the url of the webhook
-
-
-
Method Detail
-
onWebhookUpdateReceived
BotApiMethod onWebhookUpdateReceived(Update update)
This method is called when receiving updates via webhook- Parameters:
update
- Update received
-
getBotUsername
String getBotUsername()
Gets bot username of this bot- Returns:
- Bot username
-
getBotToken
String getBotToken()
Gets bot token to access Telegram API- Returns:
- Bot token
-
setWebhook
void setWebhook(String url, String publicCertificatePath) throws TelegramApiRequestException
Execute setWebhook method to set up the url of the webhook- Parameters:
url
- Url for the webhookpublicCertificatePath
- Path to the public key certificate of the webhook- Throws:
TelegramApiRequestException
- In case of error executing the request
-
getBotPath
String getBotPath()
Gets in the url for the webhook- Returns:
- path in the url
-
-