# dev.inmo.tgbotapi.webapps

docs

# Package dev.inmo.tgbotapi.webapps

## Types

ColorScheme
Link copied to clipboard
enum ColorScheme : Enum < ColorScheme >
Content copied to clipboard
EventHandler
Link copied to clipboard
typealias EventHandler = WebApp .() -> Unit
Content copied to clipboard
EventType
Link copied to clipboard
sealed class EventType
Content copied to clipboard
MainButton
Link copied to clipboard
external class MainButton
Content copied to clipboard
MainButtonParams
Link copied to clipboard
data class MainButtonParams ( val text: String ? = null, val color: String ? = null, val textColor: String ? = null, val isActive: Boolean ? = null, val isVisible: Boolean ? = null)
Content copied to clipboard
Telegram
Link copied to clipboard
external interface Telegram
Content copied to clipboard
ThemeParams
Link copied to clipboard
external interface ThemeParams
Content copied to clipboard
ViewportChangedData
Link copied to clipboard
external interface ViewportChangedData
Content copied to clipboard
ViewportChangedEventHandler
Link copied to clipboard
typealias ViewportChangedEventHandler = WebApp .( ViewportChangedData ) -> Unit
Content copied to clipboard
WebApp
Link copied to clipboard
external class WebApp
Content copied to clipboard
WebAppInitData
Link copied to clipboard
external interface WebAppInitData
Content copied to clipboard
WebAppUser
Link copied to clipboard
external interface WebAppUser
Content copied to clipboard

## Functions

answerWebAppQuery
Link copied to clipboard
suspend fun TelegramBot. answerWebAppQuery (result: InlineQueryResult): SentWebAppMessage?
Content copied to clipboard
asUser
Link copied to clipboard
fun WebAppUser . asUser (): User
Content copied to clipboard
handleResult
Link copied to clipboard
inline fun handleResult (onSendData: () -> String ?, onAnswerWebAppQuery: (WebAppQueryId) -> Unit )
Content copied to clipboard
isInitDataSafe
Link copied to clipboard
fun WebApp . isInitDataSafe (botToken: String ): Boolean
Content copied to clipboard
onClick
Link copied to clipboard
fun MainButton . onClick (eventHandler: EventHandler ): MainButton
Content copied to clipboard
onEvent
Link copied to clipboard
fun WebApp . onEvent (type: EventType , eventHandler: EventHandler ): () -> Unit
Content copied to clipboard
fun WebApp . onEvent (type: EventType.ViewportChanged , eventHandler: ViewportChangedEventHandler ): ( ViewportChangedData ) -> Unit
Content copied to clipboard
onMainButtonClicked
Link copied to clipboard
fun WebApp . onMainButtonClicked (eventHandler: EventHandler ): () -> Unit
Content copied to clipboard
onThemeChanged
Link copied to clipboard
fun WebApp . onThemeChanged (eventHandler: EventHandler ): () -> Unit
Content copied to clipboard
onViewportChanged
Link copied to clipboard
fun WebApp . onViewportChanged (eventHandler: ViewportChangedEventHandler ): ( ViewportChangedData ) -> Unit
Content copied to clipboard
sendDataOrWorkWithQueryId
Link copied to clipboard
inline fun sendDataOrWorkWithQueryId (onSendData: () -> String ?, onAnswerWebAppQuery: (WebAppQueryId) -> Unit )
Content copied to clipboard
setParams
Link copied to clipboard
fun MainButton . setParams (params: MainButtonParams ): MainButton
Content copied to clipboard

## Properties

colorScheme
Link copied to clipboard
val WebApp . colorScheme : ColorScheme
Content copied to clipboard
Telegram
Link copied to clipboard
val Window . Telegram : Telegram
Content copied to clipboard
telegram
Link copied to clipboard
val telegram : Telegram
Content copied to clipboard
webApp
Link copied to clipboard
val webApp : WebApp
Content copied to clipboard