mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-05-05 08:00:08 +00:00
deploy: ba65e01c84
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
<div class="cover ">
|
||||
<h1 class="cover"><span>get</span><wbr><span><span>Item</span></span></h1>
|
||||
</div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-device-storage/index.html">DeviceStorage</a><span class="token punctuation">.</span><a href="get-item.html"><span class="token function">getItem</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span></div><p class="paragraph">Retrieves the value associated with a key. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">The value associated with the key, or null if the key is not found.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</p></div></div></div></div></div><h4 class="">Throws</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html"><span>Illegal</span><wbr><span>State</span><wbr><span><span>Exception</span></span></a></div></span></div><div><div class="title"><p class="paragraph">If an error occurs during the operation.</p></div></div></div></div></div><hr><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-secure-storage/index.html">SecureStorage</a><span class="token punctuation">.</span><a href="get-item.html"><span class="token function">getItem</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="dev.inmo.micro_utils.common/Either///PointingToDeclaration/">Either</span><span class="token operator"><</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span><span class="token punctuation">, </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">></span></div><p class="paragraph">Retrieves the value associated with a key from secure storage. This function uses a callback-based approach for handling the asynchronous result of the operation.</p><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</p></div></div></div></div><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">A callback function that is called when the operation is complete. The first argument is an error object (a <a href="-secure-storage-error/index.html">SecureStorageError</a> if an error occurred, or null otherwise), the second argument is the retrieved value (a <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a> or null if the key is not found), and the third argument is a boolean indicating whether the value can be restored (useful if the value was previously removed and might be restorable).</p></div></div></div></div></div></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-device-storage/index.html">DeviceStorage</a><span class="token punctuation">.</span><a href="get-item.html"><span class="token function">getItem</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span></div><p class="paragraph">Retrieves the value associated with a key. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">The value associated with the key, or null if the key is not found.</p></span><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</p></div></div></div></div></div><h4 class="">Throws</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><span>Illegal</span><wbr><span>State</span><wbr><span><span>Exception</span></span></div></span></div><div><div class="title"><p class="paragraph">If an error occurs during the operation.</p></div></div></div></div></div><hr><div class="symbol monospace"><span class="token keyword">suspend </span><span class="token keyword">fun </span><a href="-secure-storage/index.html">SecureStorage</a><span class="token punctuation">.</span><a href="get-item.html"><span class="token function">getItem</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">key<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="/<Error class: unknown class>///PointingToDeclaration/"><Error class: unknown class></span><span class="token operator"><</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">?</span><span class="token punctuation">, </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator">></span></div><p class="paragraph">Retrieves the value associated with a key from secure storage. This function uses a callback-based approach for handling the asynchronous result of the operation.</p><h4 class="">Parameters</h4><div class="table"><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>key</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The key to retrieve the value for.</p></div></div></div></div><div class="table-row" data-filterable-current=":tgbotapi.webapps:dokkaHtmlPartial/jsMain" data-filterable-set=":tgbotapi.webapps:dokkaHtmlPartial/jsMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">A callback function that is called when the operation is complete. The first argument is an error object (a <a href="-secure-storage-error/index.html">SecureStorageError</a> if an error occurred, or null otherwise), the second argument is the retrieved value (a <a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a> or null if the key is not found), and the third argument is a boolean indicating whether the value can be restored (useful if the value was previously removed and might be restorable).</p></div></div></div></div></div></div></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
|
||||
|
||||
Reference in New Issue
Block a user