mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
add AnswerInlineQuery
This commit is contained in:
parent
ef127b85dc
commit
05b447da85
@ -0,0 +1,32 @@
|
|||||||
|
package com.github.insanusmokrassar.TelegramBotAPI.requests.answers
|
||||||
|
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||||
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.BooleanSerializer
|
||||||
|
|
||||||
|
data class AnswerInlineQuery(
|
||||||
|
@SerialName(inlineQueryIdField)
|
||||||
|
val inlineQueryID: InlineQueryIdentifier,
|
||||||
|
@SerialName(resultsField)
|
||||||
|
val results: List<InlineQueryResult> = emptyList(),
|
||||||
|
@SerialName(cachedTimeField)
|
||||||
|
@Optional
|
||||||
|
val cachedTime: Int? = null,
|
||||||
|
@SerialName(isPersonalField)
|
||||||
|
@Optional
|
||||||
|
val isPersonal: Boolean? = null,
|
||||||
|
@SerialName(nextOffsetField)
|
||||||
|
@Optional
|
||||||
|
val nextOffset: String? = null,
|
||||||
|
@SerialName(switchPmTextField)
|
||||||
|
@Optional
|
||||||
|
val switchPmText: String? = null,
|
||||||
|
@SerialName(switchPmParameterField)
|
||||||
|
@Optional
|
||||||
|
val switchPmParameter: String? = null
|
||||||
|
): SimpleRequest<Boolean> {
|
||||||
|
override fun method(): String = "answerInlineQuery"
|
||||||
|
override fun resultSerializer(): KSerializer<Boolean> = BooleanSerializer
|
||||||
|
}
|
@ -30,6 +30,8 @@ val invoicePayloadBytesLimit = 1 until 128
|
|||||||
|
|
||||||
val livePeriodLimit = 60 .. 86400
|
val livePeriodLimit = 60 .. 86400
|
||||||
|
|
||||||
|
val inlineQueryAnswerResultsLimit = 0 .. 50
|
||||||
|
|
||||||
const val chatIdField = "chat_id"
|
const val chatIdField = "chat_id"
|
||||||
const val messageIdField = "message_id"
|
const val messageIdField = "message_id"
|
||||||
const val updateIdField = "update_id"
|
const val updateIdField = "update_id"
|
||||||
@ -54,6 +56,7 @@ const val resultIdField = "result_id"
|
|||||||
const val inlineMessageIdField = "inline_message_id"
|
const val inlineMessageIdField = "inline_message_id"
|
||||||
const val callbackDataField = "callback_data"
|
const val callbackDataField = "callback_data"
|
||||||
const val callbackQueryIdField = "callback_query_id"
|
const val callbackQueryIdField = "callback_query_id"
|
||||||
|
const val inlineQueryIdField = "inline_query_id"
|
||||||
const val showAlertField = "show_alert"
|
const val showAlertField = "show_alert"
|
||||||
const val cachedTimeField = "cached_time"
|
const val cachedTimeField = "cached_time"
|
||||||
const val foursquareIdField = "foursquare_id"
|
const val foursquareIdField = "foursquare_id"
|
||||||
@ -61,6 +64,10 @@ const val foursquareTypeField = "foursquare_type"
|
|||||||
const val untilDateField = "until_date"
|
const val untilDateField = "until_date"
|
||||||
const val errorMessageField = "error_message"
|
const val errorMessageField = "error_message"
|
||||||
const val messageTextField = "message_text"
|
const val messageTextField = "message_text"
|
||||||
|
const val isPersonalField = "is_personal"
|
||||||
|
const val nextOffsetField = "next_offset"
|
||||||
|
const val switchPmTextField = "switch_pm_text"
|
||||||
|
const val switchPmParameterField = "switch_pm_parameter"
|
||||||
|
|
||||||
|
|
||||||
const val photoUrlField = "photo_url"
|
const val photoUrlField = "photo_url"
|
||||||
@ -164,6 +171,7 @@ const val amountField = "amount"
|
|||||||
const val pricesField = "prices"
|
const val pricesField = "prices"
|
||||||
const val payloadField = "payload"
|
const val payloadField = "payload"
|
||||||
const val vcardField = "vcard"
|
const val vcardField = "vcard"
|
||||||
|
const val resultsField = "results"
|
||||||
|
|
||||||
const val pointField = "point"
|
const val pointField = "point"
|
||||||
const val xShiftField = "x_shift"
|
const val xShiftField = "x_shift"
|
||||||
|
Loading…
Reference in New Issue
Block a user