Requests Executor
Interface for making requests to Telegram Bot API. Currently, there is only one built-in implementation - dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor
See also
Functions
Inheritors
Extensions
executeAsync
Link copied to clipboard
fun <T : Any> RequestsExecutor.executeAsync(request: Request<T>, scope: CoroutineScope): Deferred<T>
Content copied to clipboard
suspend fun <T : Any> RequestsExecutor.executeAsync(request: Request<T>): Deferred<T>
Content copied to clipboard
executeUnsafe
Link copied to clipboard
setWebhookInfoAndStartListenWebhooks
Link copied to clipboard
suspend fun RequestsExecutor.setWebhookInfoAndStartListenWebhooks(listenPort: Int, engineFactory: ApplicationEngineFactory<*, *>, setWebhookRequest: SetWebhookRequest, exceptionsHandler: ExceptionHandler<Unit> = {}, listenHost: String = "0.0.0.0", listenRoute: String = "/", privateKeyConfig: WebhookPrivateKeyConfig? = null, scope: CoroutineScope = CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher()), mediaGroupsDebounceTimeMillis: Long = 1000L, block: UpdateReceiver<Update>): ApplicationEngine
Content copied to clipboard
Setting up ktor server, set webhook info via SetWebhookRequest request.
startGettingOfUpdatesByLongPolling
Link copied to clipboard
fun RequestsExecutor.startGettingOfUpdatesByLongPolling(updatesFilter: UpdatesFilter, timeoutSeconds: Seconds = 30, exceptionsHandler: ExceptionHandler<Unit>? = null, scope: CoroutineScope = CoroutineScope(Dispatchers.Default)): Job
Content copied to clipboard