1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-18 14:23:48 +00:00
tgbotapi/docs/dev.inmo.tgbotapi.bot/-requests-executor/index.html

205 lines
35 KiB
HTML
Raw Normal View History

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>RequestsExecutor</title>
<link href="../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../";</script> <script>const storage = localStorage.getItem("dokka-dark-mode")
const savedDarkMode = storage ? JSON.parse(storage) : false
if(savedDarkMode === true){
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}</script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script><link href="../../../styles/style.css" rel="Stylesheet"><link href="../../../styles/jetbrains-mono.css" rel="Stylesheet"><link href="../../../styles/main.css" rel="Stylesheet"><link href="../../../styles/prism.css" rel="Stylesheet"><link href="../../../styles/logo-styles.css" rel="Stylesheet"><script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script><script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script><script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script><script type="text/javascript" src="../../../scripts/main.js" defer="defer"></script><script type="text/javascript" src="../../../scripts/prism.js" async="async"></script> </head>
<body>
<div class="navigation-wrapper" id="navigation-wrapper">
<div id="leftToggler"><span class="icon-toggler"></span></div>
<div class="library-name"><a href="../../../index.html">docs</a></div>
<div></div>
<div class="pull-right d-flex">
<div class="filter-section" id="filter-section"><button class="platform-tag platform-selector common-like" data-active="" data-filter=":docs:dokkaHtml/commonMain">common</button><button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":docs:dokkaHtml/jvmMain">jvm</button></div>
<button id="theme-toggle-button"><span id="theme-toggle"></span></button>
<div id="searchBar"></div>
</div>
</div>
<div id="container">
<div id="leftColumn">
<div id="sideMenu"></div>
</div>
<div id="main">
<div class="main-content" id="content" pageIds="docs::dev.inmo.tgbotapi.bot/RequestsExecutor///PointingToDeclaration//-1982836883">
<div class="breadcrumbs"><a href="../../../index.html">docs</a>/<a href="../index.html">dev.inmo.tgbotapi.bot</a>/<a href="index.html">RequestsExecutor</a></div>
<div class="cover ">
<h1 class="cover"><span>Requests</span><wbr></wbr><span><span>Executor</span></span></h1>
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">interface </span><a href="index.html">RequestsExecutor</a> : <span data-unresolved-link="io.ktor.utils.io.core/Closeable///PointingToDeclaration/">Closeable</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">Interface for making requests to Telegram Bot API. Currently, there is only one built-in implementation - <a href="../../dev.inmo.tgbotapi.bot.Ktor/-ktor-requests-executor/index.html">dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor</a></p></div> </div>
</div>
<div class="tabbedcontent">
<div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="Functions">Functions</button><button class="section-tab" data-togglable="Extensions">Extensions</button><button class="section-tab" data-togglable="See also">See also</button><button class="section-tab" data-togglable="Inheritors">Inheritors</button></div>
<div class="tabs-section-body">
<h2 class="">See also</h2>
<div data-togglable="See also">
<div class="platform-hinted WithExtraAttributes with-platform-tabs" data-platform-hinted="data-platform-hinted" data-togglable="See also">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div data-togglable="See also"><div class="table" data-togglable="See also"><div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain"><div class="main-subrow keyValue WithExtraAttributes"><div class=""><span class="inline-flex"><div><a href="../../dev.inmo.tgbotapi.requests.abstracts/-request/index.html"><span>dev.</span><wbr></wbr><span>inmo.</span><wbr></wbr><span>tgbotapi.</span><wbr></wbr><span>requests.</span><wbr></wbr><span>abstracts.</span><wbr></wbr><span>Request</span></a></div></span></div><div><div class="title"><div data-togglable="See also"></div></div></div></div></div><div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain"><div class="main-subrow keyValue WithExtraAttributes"><div class=""><span class="inline-flex"><div><a href="../../dev.inmo.tgbotapi.bot.Ktor/-ktor-requests-executor/index.html"><span>dev.</span><wbr></wbr><span>inmo.</span><wbr></wbr><span>tgbotapi.</span><wbr></wbr><span>bot.</span><wbr></wbr><span>Ktor.</span><wbr></wbr><span>Ktor</span><wbr></wbr><span>Requests</span><wbr></wbr><span><span>Executor</span></span></a></div></span></div><div><div class="title"><div data-togglable="See also"></div></div></div></div></div></div></div></div> </div>
</div>
<h2 class="">Functions</h2>
<div class="table" data-togglable="Functions"><a data-name="539526881%2FFunctions%2F-1982836883" anchor-label="close" id="539526881%2FFunctions%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="index.html#539526881%2FFunctions%2F-1982836883"><span><span>close</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="539526881%2FFunctions%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">expect </span><span class="token keyword">abstract </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="index.html#539526881%2FFunctions%2F-1982836883"><span class="token function">close</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div> </div>
</div>
</div>
</div>
</div>
<a data-name="-2115112755%2FFunctions%2F-1982836883" anchor-label="execute" id="-2115112755%2FFunctions%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="execute.html"><span><span>execute</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2115112755%2FFunctions%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">suspend </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="execute.html">T</a><span class="token operator"> : </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a><span class="token operator">&gt; </span><a href="execute.html"><span class="token function">execute</span></a><span class="token punctuation">(</span>request<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">Request</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="execute.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="execute.html">T</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><p class="paragraph">Unsafe execution of incoming <a href="execute.html">request</a>. Can throw almost any exception. So, it is better to use something like <a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">dev.inmo.tgbotapi.extensions.utils.shortcuts.executeAsync</a> or <a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.html">dev.inmo.tgbotapi.extensions.utils.shortcuts.executeUnsafe</a></p></div></div> </div>
</div>
</div>
</div>
</div>
</div>
<h2 class="">Inheritors</h2>
<div class="table" data-togglable="Inheritors"><a data-name="1816604265%2FInheritors%2F-1982836883" anchor-label="BehaviourContext" id="1816604265%2FInheritors%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.extensions.behaviour_builder/-behaviour-context/index.html">BehaviourContext</a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1816604265%2FInheritors%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div></div>
</div>
</div>
<a data-name="1252781460%2FInheritors%2F-1982836883" anchor-label="DefaultBehaviourContext" id="1252781460%2FInheritors%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.extensions.behaviour_builder/-default-behaviour-context/index.html">DefaultBehaviourContext</a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1252781460%2FInheritors%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div></div>
</div>
</div>
<a data-name="1501462855%2FInheritors%2F-1982836883" anchor-label="BaseRequestsExecutor" id="1501462855%2FInheritors%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../-base-requests-executor/index.html">BaseRequestsExecutor</a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1501462855%2FInheritors%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div></div>
</div>
</div>
<a data-name="-729707868%2FInheritors%2F-1982836883" anchor-label="SimpleMultiServerRequestsExecutor" id="-729707868%2FInheritors%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.bot.multiserver/-simple-multi-server-requests-executor/index.html">SimpleMultiServerRequestsExecutor</a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-729707868%2FInheritors%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div></div>
</div>
</div>
</div>
<h2 class="tabbedcontent">Extensions</h2>
<div class="table" data-togglable="Extensions"><a data-name="356852609%2FExtensions%2F-1982836883" anchor-label="executeAsync" id="356852609%2FExtensions%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html"><span>execute</span><wbr></wbr><span><span>Async</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="356852609%2FExtensions%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">T</a><span class="token operator"> : </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a><span class="token operator">&gt; </span><a href="index.html">RequestsExecutor</a><span class="token punctuation">.</span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html"><span class="token function">executeAsync</span></a><span class="token punctuation">(</span>request<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">Request</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">, </span>scope<span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/Deferred///PointingToDeclaration/">Deferred</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">T</a><span class="token operator">&gt;</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">T</a><span class="token operator"> : </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a><span class="token operator">&gt; </span><a href="index.html">RequestsExecutor</a><span class="token punctuation">.</span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html"><span class="token function">executeAsync</span></a><span class="token punctuation">(</span>request<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">Request</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/Deferred///PointingToDeclaration/">Deferred</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-async.html">T</a><span class="token operator">&gt;</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div> </div>
</div>
</div>
</div>
</div>
<a data-name="-1781699129%2FExtensions%2F-1982836883" anchor-label="executeUnsafe" id="-1781699129%2FExtensions%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.html"><span>execute</span><wbr></wbr><span><span>Unsafe</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1781699129%2FExtensions%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.html">T</a><span class="token operator"> : </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a><span class="token operator">&gt; </span><a href="index.html">RequestsExecutor</a><span class="token punctuation">.</span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.html"><span class="token function">executeUnsafe</span></a><span class="token punctuation">(</span>request<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.requests.abstracts/-request/index.html">Request</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">, </span>retries<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">0</span><span class="token punctuation">, </span>retriesDelay<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="token operator"> = </span><span class="token constant">1000</span><span class="token punctuation">, </span>onAllFailed<span class="token operator">: </span><span class="token keyword">suspend </span><span class="token punctuation">(</span><span class="token keyword"></span>exceptions<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html">Array</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html">Throwable</a><span class="token operator">&gt;</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">)</span><span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.extensions.utils.shortcuts/execute-unsafe.html">T</a><span class="token operator">?</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div> </div>
</div>
</div>
</div>
</div>
<a data-name="-2099623137%2FExtensions%2F2063174889" anchor-label="setWebhookInfoAndStartListenWebhooks" id="-2099623137%2FExtensions%2F2063174889" data-filterable-set=":docs:dokkaHtml/jvmMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/jvmMain" data-filterable-set=":docs:dokkaHtml/jvmMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/set-webhook-info-and-start-listen-webhooks.html"><span>set</span><wbr></wbr><span>Webhook</span><wbr></wbr><span>Info</span><wbr></wbr><span>And</span><wbr></wbr><span>Start</span><wbr></wbr><span>Listen</span><wbr></wbr><span><span>Webhooks</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2099623137%2FExtensions%2F2063174889"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark jvm-like" data-filterable-current=":docs:dokkaHtml/jvmMain" data-filterable-set=":docs:dokkaHtml/jvmMain" data-active="" data-toggle=":docs:dokkaHtml/jvmMain">jvm</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/jvmMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="index.html#1584683032%2FExtensions%2F2063174889">RequestsExecutor</a><span class="token punctuation">.</span><a href="../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/set-webhook-info-and-start-listen-webhooks.html"><span class="token function">setWebhookInfoAndStartListenWebhooks</span></a><span class="token punctuation">(</span>listenPort<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token punctuation">, </span>engineFactory<span class="token operator">: </span><span data-unresolved-link="io.ktor.server.engine/ApplicationEngineFactory///PointingToDeclaration/">ApplicationEngineFactory</span><span class="token operator">&lt;</span><span class="token operator">*</span><span class="token punctuation">, </span><span class="token operator">*</span><span class="token operator">&gt;</span><span class="token punctuation">, </span>setWebhookRequest<span class="token operator">: </span><span data-unresolved-link="dev.inmo.tgbotapi.requests.webhook/SetWebhookRequest///PointingToDeclaration/">SetWebhookRequest</span><span class="token punctuation">, </span>exceptionsHandler<span class="token operator">: </span><span data-unresolved-link="dev.inmo.micro_utils.coroutines/ExceptionHandler///PointingToDeclaration/">ExceptionHandler</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><span class="token operator">&gt;</span><span class="token operator"> = </span>{}<span class="token punctuation">, </span>listenHost<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="token operator"> = </span><span class="token string">&quot;0.0.0.0&quot;</span><span class="token punctuation">, </span>listenRoute<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="token operator"> = </span><span class="token string">&quot;/&quot;</span><span class="token punctuation">, </span>privateKeyConfig<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.updateshandlers.webhook/-webhook-private-key-config/index.html">WebhookPrivateKeyConfig</a><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span>scope<span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><span class="token operator"> = </span>CoroutineScope(Executors.newFixedThreadPool(4).asCoroutineDispatcher())<span class="token punctuation">, </span>mediaGroupsDebounceTimeMillis<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="token operator"> = </span><span class="token constant">1000</span><span class="token punctuation">, </span>block<span class="token operator">: </span><span data-unresolved-link="dev.inmo.tgbotapi.updateshandlers/UpdateReceiver///PointingToDeclaration/">UpdateReceiver</span><span class="token operator">&lt;</span><span class="token keyword"></span><span data-unresolved-link="dev.inmo.tgbotapi.types.update.abstracts/Update///PointingToDeclaration/">Update</span><span class="token operator">&gt;</span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.ktor.server.engine/ApplicationEngine///PointingToDeclaration/">ApplicationEngine</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><p class
</div>
</div>
</div>
</div>
<a data-name="-688805984%2FExtensions%2F-1982836883" anchor-label="startGettingOfUpdatesByLongPolling" id="-688805984%2FExtensions%2F-1982836883" data-filterable-set=":docs:dokkaHtml/commonMain"></a>
<div class="table-row" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/start-getting-of-updates-by-long-polling.html"><span>start</span><wbr></wbr><span>Getting</span><wbr></wbr><span>Of</span><wbr></wbr><span>Updates</span><wbr></wbr><span>By</span><wbr></wbr><span>Long</span><wbr></wbr><span><span>Polling</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-688805984%2FExtensions%2F-1982836883"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark common-like" data-filterable-current=":docs:dokkaHtml/commonMain" data-filterable-set=":docs:dokkaHtml/commonMain" data-active="" data-toggle=":docs:dokkaHtml/commonMain">common</button></div>
<div class="content sourceset-depenent-content" data-active="" data-togglable=":docs:dokkaHtml/commonMain"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">fun </span><a href="index.html">RequestsExecutor</a><span class="token punctuation">.</span><a href="../../dev.inmo.tgbotapi.extensions.utils.updates.retrieving/start-getting-of-updates-by-long-polling.html"><span class="token function">startGettingOfUpdatesByLongPolling</span></a><span class="token punctuation">(</span>updatesFilter<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.updateshandlers/-updates-filter/index.html">UpdatesFilter</a><span class="token punctuation">, </span>timeoutSeconds<span class="token operator">: </span><a href="../../dev.inmo.tgbotapi.types/index.html#-1838927582%2FClasslikes%2F-1982836883">Seconds</a><span class="token operator"> = </span><span class="token constant">30</span><span class="token punctuation">, </span>exceptionsHandler<span class="token operator">: </span><span data-unresolved-link="dev.inmo.micro_utils.coroutines/ExceptionHandler///PointingToDeclaration/">ExceptionHandler</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a><span class="token operator">&gt;</span><span class="token operator">?</span><span class="token operator"> = </span>null<span class="token punctuation">, </span>scope<span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/CoroutineScope///PointingToDeclaration/">CoroutineScope</span><span class="token operator"> = </span>CoroutineScope(Dispatchers.Default)<span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="kotlinx.coroutines/Job///PointingToDeclaration/">Job</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer"><span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2022 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span></div>
</div>
</div>
</body>
</html>