From 67fafdac001d67ba3adc66e77e7c9aa68f4567cd Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 14 May 2020 12:14:38 +0600 Subject: [PATCH] add docs for RequestsExecutor --- .../TelegramBotAPI/bot/RequestsExecutor.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt index 285793254b..d511ed63fa 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt @@ -3,9 +3,19 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request import io.ktor.utils.io.core.Closeable +/** + * Interface for making requests to Telegram Bot API + * + * @see Request + * @see com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor + */ interface RequestsExecutor : Closeable { /** - * @throws com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException + * Unsafe execution of incoming [request]. Can throw almost any exception. So, it is better to use + * something like [com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.executeAsync] or + * [com.github.insanusmokrassar.TelegramBotAPI.utils.extensions.executeUnsafe] + * + * @throws Exception */ suspend fun execute(request: Request): T } \ No newline at end of file