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

add Mpeg4Gif InlineQueryResult

This commit is contained in:
InsanusMokrassar 2019-02-07 12:15:16 +08:00
parent fb5fdc6357
commit 3bf37d1b73
6 changed files with 109 additions and 3 deletions

View File

@ -65,14 +65,19 @@ const val photoSizeField = "photo_size"
const val photoFileIdField = "photo_file_id"
const val gifUrlField = "gif_url"
const val gifFileIdField = "gif_file_id"
const val gifWidthField = "gif_width"
const val gifHeightField = "gif_height"
const val gifDurationField = "gif_duration"
const val mpeg4GifUrlField = "mpeg4_url"
const val mpeg4GifFileIdField = "mpeg4_file_id"
const val mpeg4GifWidthField = "mpeg4_width"
const val mpeg4GifHeightField = "mpeg4_height"
const val mpeg4GifDurationField = "mpeg4_duration"
const val thumbUrlField = "thumb_url"
const val thumbWidthField = "thumb_width"
const val thumbHeightField = "thumb_height"
const val photoWidthField = "photo_width"
const val photoHeightField = "photo_height"
const val gifWidthField = "gif_width"
const val gifHeightField = "gif_height"
const val gifDurationField = "gif_duration"
const val inputMessageContentField = "input_message_content"
const val hideUrlField = "hide_url"
const val gameShortNameField = "game_short_name"

View File

@ -0,0 +1,35 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif
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.results.gif.InlineQueryResultGifCached
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import kotlinx.serialization.Optional
import kotlinx.serialization.SerialName
data class InlineQueryResultMpeg4GifCachedImpl(
@SerialName(idField)
override val id: String,
@SerialName(mpeg4GifFileIdField)
override val fileId: FileId,
@SerialName(titleField)
@Optional
override val title: String? = null,
@SerialName(captionField)
@Optional
override val caption: String? = null,
@SerialName(parseModeField)
@Optional
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
@Optional
override val replyMarkup: InlineKeyboardMarkup? = null,
@SerialName(inputMessageContentField)
@Optional
override val inputMessageContent: InputMessageContent? = null
) : InlineQueryResultMpeg4GifCached

View File

@ -0,0 +1,43 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult
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.results.mpeg4gif.InlineQueryResultMpeg4Gif
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import kotlinx.serialization.Optional
import kotlinx.serialization.SerialName
data class InlineQueryResultMpeg4GifImpl(
@SerialName(idField)
override val id: String,
@SerialName(mpeg4GifUrlField)
override val url: String,
@SerialName(thumbUrlField)
override val thumbUrl: String,
@SerialName(mpeg4GifWidthField)
@Optional
override val width: Int? = null,
@SerialName(mpeg4GifHeightField)
@Optional
override val height: Int? = null,
@SerialName(mpeg4GifDurationField)
@Optional
override val duration: Int? = null,
@SerialName(titleField)
@Optional
override val title: String? = null,
@SerialName(captionField)
@Optional
override val caption: String? = null,
@SerialName(parseModeField)
@Optional
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
@Optional
override val replyMarkup: InlineKeyboardMarkup? = null,
@SerialName(inputMessageContentField)
@Optional
override val inputMessageContent: InputMessageContent? = null
) : InlineQueryResultMpeg4Gif

View File

@ -0,0 +1,5 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultMpeg4Gif : InlineQueryResultMpeg4GifCommon, UrlInlineQueryResult, ThumbedInlineQueryResult, SizedInlineQueryResult, DuratedInlineResultQuery

View File

@ -0,0 +1,5 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultMpeg4GifCached : InlineQueryResultMpeg4GifCommon, WithFileIdInlineQueryResult

View File

@ -0,0 +1,13 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Captioned
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
interface InlineQueryResultMpeg4GifCommon : InlineQueryResult,
TitledInlineQueryResult,
Captioned,
WithInputMessageContentInlineQueryResult
{
override val type: String
get() = "mpeg4_gif"
}