mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
add Contact InlineQueryResult + add vcard field
This commit is contained in:
parent
1963432bc8
commit
849e21bf15
@ -161,6 +161,7 @@ const val labelField = "label"
|
||||
const val amountField = "amount"
|
||||
const val pricesField = "prices"
|
||||
const val payloadField = "payload"
|
||||
const val vcardField = "vcard"
|
||||
|
||||
const val pointField = "point"
|
||||
const val xShiftField = "x_shift"
|
||||
|
@ -15,6 +15,7 @@ data class Contact(
|
||||
@SerialName(userIdField)
|
||||
@Optional
|
||||
val userId: UserId? = null,
|
||||
@SerialName(vcardField)
|
||||
@Optional
|
||||
override val vcard: String? = null
|
||||
) : CommonContactData
|
||||
|
@ -0,0 +1,50 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.mimeTypeField
|
||||
import kotlinx.serialization.Optional
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
data class InlineQueryResultContact(
|
||||
@SerialName(idField)
|
||||
override val id: String,
|
||||
@SerialName(phoneNumberField)
|
||||
override val phoneNumber: String,
|
||||
@SerialName(firstNameField)
|
||||
override val firstName: String,
|
||||
@SerialName(lastNameField)
|
||||
@Optional
|
||||
override val lastName: String? = null,
|
||||
@SerialName(vcardField)
|
||||
@Optional
|
||||
override val vcard: String? = null,
|
||||
@SerialName(thumbUrlField)
|
||||
@Optional
|
||||
override val thumbUrl: String? = null,
|
||||
@SerialName(thumbWidthField)
|
||||
@Optional
|
||||
override val thumbWidth: Int? = null,
|
||||
@SerialName(thumbHeightField)
|
||||
@Optional
|
||||
override val thumbHeight: Int? = null,
|
||||
@SerialName(replyMarkupField)
|
||||
@Optional
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||
@SerialName(inputMessageContentField)
|
||||
@Optional
|
||||
override val inputMessageContent: InputMessageContent? = null
|
||||
) : InlineQueryResult,
|
||||
CommonContactData,
|
||||
WithInputMessageContentInlineQueryResult,
|
||||
ThumbedInlineQueryResult,
|
||||
ThumbSizedInlineQueryResult
|
||||
{
|
||||
override val type: String = "contact"
|
||||
}
|
@ -14,6 +14,7 @@ data class InputContactMessageContent(
|
||||
@SerialName(lastNameField)
|
||||
@Optional
|
||||
override val lastName: String? = null,
|
||||
@SerialName(vcardField)
|
||||
@Optional
|
||||
override val vcard: String? = null
|
||||
) : CommonContactData, InputMessageContent
|
Loading…
Reference in New Issue
Block a user