mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
LoginURL and LoginURLInlineKeyboardButton
This commit is contained in:
parent
f50d2c3355
commit
5bc3169578
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## 0.16.0 Bot API 4.3
|
## 0.16.0 Bot API 4.3
|
||||||
|
|
||||||
|
* `LoginURL` and `LoginURLInlineKeyboardButton` has been added
|
||||||
|
|
||||||
## 0.15.0
|
## 0.15.0
|
||||||
|
|
||||||
* Old `UpdatesPoller` removed (was deprecated)
|
* Old `UpdatesPoller` removed (was deprecated)
|
||||||
|
@ -84,6 +84,12 @@ const val lastErrorDateField = "last_error_date"
|
|||||||
const val lastErrorMessageField = "last_error_message"
|
const val lastErrorMessageField = "last_error_message"
|
||||||
const val votesCountField = "voter_count"
|
const val votesCountField = "voter_count"
|
||||||
const val isClosedField = "is_closed"
|
const val isClosedField = "is_closed"
|
||||||
|
const val loginUrlField = "login_url"
|
||||||
|
const val forwardTextField = "forward_text"
|
||||||
|
const val botUsernameField = "bot_username"
|
||||||
|
|
||||||
|
|
||||||
|
const val requestWriteAccessField = "request_write_access"
|
||||||
|
|
||||||
|
|
||||||
const val photoUrlField = "photo_url"
|
const val photoUrlField = "photo_url"
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardButtons
|
||||||
|
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class LoginURLInlineKeyboardButton(
|
||||||
|
override val text: String,
|
||||||
|
@SerialName(loginUrlField)
|
||||||
|
val loginUrl: LoginURL
|
||||||
|
) : InlineKeyboardButton
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class LoginURL(
|
||||||
|
@SerialName(urlField)
|
||||||
|
val url: String,
|
||||||
|
@SerialName(forwardTextField)
|
||||||
|
val forwardText: String? = null,
|
||||||
|
@SerialName(botUsernameField)
|
||||||
|
val botUsername: String? = null,
|
||||||
|
@SerialName(requestWriteAccessField)
|
||||||
|
val requestWriteAccess: Boolean? = null
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user