1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 00:03:48 +00:00

InlineQueryResult#id type change

This commit is contained in:
InsanusMokrassar 2020-09-20 20:16:14 +06:00
parent e4f305b3ec
commit 89dc7a4b2a
22 changed files with 27 additions and 21 deletions

View File

@ -44,6 +44,10 @@
### 0.28.3
* `TelegramBotAPI-core`:
* All `InlineQueryResult` has changed their type of id for more obvious relation between `InlineQueryResult#id` and
`ChosenInlineResult#resultId`: `String` -> `InlineQueryIdentifier`
### 0.28.2
* `TelegramBotAPI-extensions-utils`:

View File

@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
@Serializable
class InlineQueryResultArticle(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(titleField)
override val title: String,
@SerialName(inputMessageContentField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultAudioCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(audioFileIdField)
override val fileId: FileId,
@SerialName(captionField)

View File

@ -13,7 +13,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultAudioImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(audioUrlField)
override val url: String,
@SerialName(titleField)

View File

@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultContact(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(phoneNumberField)
override val phoneNumber: String,
@SerialName(firstNameField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultDocumentCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(documentFileIdField)
override val fileId: FileId,
@SerialName(titleField)

View File

@ -15,7 +15,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultDocumentImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(documentUrlField)
override val url: String,
@SerialName(titleField)

View File

@ -1,6 +1,7 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.gameShortNameField
import kotlinx.serialization.SerialName
@ -8,7 +9,7 @@ import kotlinx.serialization.Serializable
@Serializable
class InlineQueryResultGame(
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(gameShortNameField)
val gameShortName: String,
override val replyMarkup: InlineKeyboardMarkup? = null

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultGifCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(gifFileIdField)
override val fileId: FileId,
@SerialName(titleField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultGifImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(gifUrlField)
override val url: String,
@SerialName(thumbUrlField)

View File

@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultLocation(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultMpeg4GifCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(mpeg4GifFileIdField)
override val fileId: FileId,
@SerialName(titleField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultMpeg4GifImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(mpeg4GifUrlField)
override val url: String,
@SerialName(thumbUrlField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultPhotoCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(photoFileIdField)
override val fileId: FileId,
@SerialName(titleField)

View File

@ -13,7 +13,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultPhotoImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(photoUrlField)
override val url: String,
@SerialName(thumbUrlField)

View File

@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultStickerCached(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(stickerFileIdField)
override val fileId: FileId,
@SerialName(replyMarkupField)

View File

@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultVenue(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultVideoCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(videoFileIdField)
override val fileId: FileId,
@SerialName(titleField)

View File

@ -15,7 +15,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultVideoImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(videoUrlField)
override val url: String,
@SerialName(thumbUrlField)

View File

@ -14,7 +14,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultVoiceCachedImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(voiceFileIdField)
override val fileId: FileId,
@SerialName(titleField)

View File

@ -13,7 +13,7 @@ import kotlinx.serialization.Serializable
@Serializable
data class InlineQueryResultVoiceImpl(
@SerialName(idField)
override val id: String,
override val id: InlineQueryIdentifier,
@SerialName(voiceUrlField)
override val url: String,
@SerialName(titleField)

View File

@ -1,12 +1,13 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.serializers.InlineQueryResultSerializer
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.Serializable
@Serializable(InlineQueryResultSerializer::class)
interface InlineQueryResult {
val type: String
val id: String
val id: InlineQueryIdentifier
val replyMarkup: InlineKeyboardMarkup?
}