public class TelegramBotsApi extends Object
| Constructor and Description |
|---|
TelegramBotsApi() |
TelegramBotsApi(String keyStore,
String keyStorePassword,
String externalUrl,
String internalUrl) |
TelegramBotsApi(String keyStore,
String keyStorePassword,
String externalUrl,
String internalUrl,
String pathToCertificate) |
| Modifier and Type | Method and Description |
|---|---|
BotSession |
registerBot(LongPollingBot bot)
Register a bot.
|
void |
registerBot(WebhookBot bot)
Register a bot in the api that will receive updates using webhook method
|
public TelegramBotsApi()
public TelegramBotsApi(String keyStore, String keyStorePassword, String externalUrl, String internalUrl) throws TelegramApiRequestException
keyStore - KeyStore for the serverkeyStorePassword - Key store password for the serverexternalUrl - External base url for the webhookinternalUrl - Internal base url for the webhookTelegramApiRequestExceptionpublic TelegramBotsApi(String keyStore, String keyStorePassword, String externalUrl, String internalUrl, String pathToCertificate) throws TelegramApiRequestException
keyStore - KeyStore for the serverkeyStorePassword - Key store password for the serverexternalUrl - External base url for the webhookinternalUrl - Internal base url for the webhookpathToCertificate - Full path until .pem public certificate keysTelegramApiRequestExceptionpublic BotSession registerBot(LongPollingBot bot) throws TelegramApiRequestException
bot - the bot to registerTelegramApiRequestExceptionpublic void registerBot(WebhookBot bot) throws TelegramApiRequestException
bot - Bot to registerTelegramApiRequestExceptionCopyright © 2016. All rights reserved.