mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
commit
0fafd69903
10
CHANGELOG.md
10
CHANGELOG.md
@ -67,6 +67,16 @@ of `]` in links titles
|
|||||||
* Now `MediaGroupContent` is `MediaContent`
|
* Now `MediaGroupContent` is `MediaContent`
|
||||||
* All `MedaContent` now have no generics and have basic `TelegramMediaFile` media field
|
* All `MedaContent` now have no generics and have basic `TelegramMediaFile` media field
|
||||||
|
|
||||||
|
### 0.12.6 Libraries updates
|
||||||
|
|
||||||
|
* `kotlin` version `1.3.21` -> `1.3.30`
|
||||||
|
* `kotlin coroutines` version `1.1.1` -> `1.2.0`
|
||||||
|
* `kotlin serialization` version `0.10.0` -> `0.11.0`
|
||||||
|
* `ktor` version `1.1.2` -> `1.1.3`
|
||||||
|
* Added `DeleteWebhook` request
|
||||||
|
* All default `startGettingOfUpdates` (in fact - method `start` of `UpdatesPoller`) are suspend and
|
||||||
|
will try to delete webhook
|
||||||
|
|
||||||
## 0.11.0
|
## 0.11.0
|
||||||
|
|
||||||
* Kotlin `1.3.11` -> `1.3.21`
|
* Kotlin `1.3.11` -> `1.3.21`
|
||||||
|
34
README.md
34
README.md
@ -12,7 +12,39 @@ solves or unuseful moments are describing by official [Telegram Bot API](https:/
|
|||||||
|
|
||||||
This version compatible with [July 2018 update of TelegramBotAPI](https://core.telegram.org/bots/api#july-26-2018). That means that
|
This version compatible with [July 2018 update of TelegramBotAPI](https://core.telegram.org/bots/api#july-26-2018). That means that
|
||||||
most part of API has been implemented (according to last [August 2018 update of TelegramBotAPI](https://core.telegram.org/bots/api#august-27-2018))
|
most part of API has been implemented (according to last [August 2018 update of TelegramBotAPI](https://core.telegram.org/bots/api#august-27-2018))
|
||||||
except the Passport API which will be included as soon as possible.
|
except the Passport API which will be included as soon as possible. All included and supported API
|
||||||
|
can be found on [wiki](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/Included-API).
|
||||||
|
|
||||||
|
## How to implement library?
|
||||||
|
|
||||||
|
Common ways to implement this library are presented here. In some cases it will require additional steps
|
||||||
|
like inserting of additional libraries (like `kotlin stdlib`). In the examples will be used variable
|
||||||
|
`telegrambotapi.version`, which must be set up by developer. Available versions are presented on
|
||||||
|
[bintray](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI), next version is last published:
|
||||||
|
|
||||||
|
[![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI/images/download.svg) ](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI/_latestVersion)
|
||||||
|
|
||||||
|
### Maven
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.insanusmokrassar</groupId>
|
||||||
|
<artifactId>TelegramBotAPI</artifactId>
|
||||||
|
<version>${telegrambotapi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gradle
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
implementation "com.github.insanusmokrassar:TelegramBotAPI:${telegrambotapi.version}"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Gradle (old)
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
compile "com.github.insanusmokrassar:TelegramBotAPI:${telegrambotapi.version}"
|
||||||
|
```
|
||||||
|
|
||||||
## How to work with library?
|
## How to work with library?
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project.version = "0.12.5"
|
project.version = "0.12.6"
|
||||||
project.group = "com.github.insanusmokrassar"
|
project.group = "com.github.insanusmokrassar"
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin_version=1.3.21
|
kotlin_version=1.3.30
|
||||||
kotlin_coroutines_version=1.1.1
|
kotlin_coroutines_version=1.2.0
|
||||||
kotlin_serialisation_runtime_version=0.10.0
|
kotlin_serialisation_runtime_version=0.11.0
|
||||||
joda_time_version=2.10.1
|
joda_time_version=2.10.1
|
||||||
ktor_version=1.1.2
|
ktor_version=1.1.3
|
||||||
|
|
||||||
gradle_bintray_plugin_version=1.8.4
|
gradle_bintray_plugin_version=1.8.4
|
||||||
|
|
||||||
|
@ -1,16 +1,11 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.bot.settings
|
package com.github.insanusmokrassar.TelegramBotAPI.bot.settings
|
||||||
|
|
||||||
import kotlinx.serialization.Optional
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ProxySettings(
|
data class ProxySettings(
|
||||||
@Optional
|
|
||||||
val host: String = "localhost",
|
val host: String = "localhost",
|
||||||
@Optional
|
|
||||||
val port: Int = 1080,
|
val port: Int = 1080,
|
||||||
@Optional
|
|
||||||
val username: String? = null,
|
val username: String? = null,
|
||||||
@Optional
|
|
||||||
val password: String? = null
|
val password: String? = null
|
||||||
)
|
)
|
||||||
|
@ -2,7 +2,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters
|
|||||||
|
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.channels.Channel
|
import kotlinx.coroutines.channels.Channel
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.Transient
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
import kotlin.coroutines.*
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
@ -14,13 +15,9 @@ private object CompleteRequest : RequestEvent()
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class PowLimiter(
|
data class PowLimiter(
|
||||||
@Optional
|
|
||||||
private val minAwaitTime: Long = 0L,
|
private val minAwaitTime: Long = 0L,
|
||||||
@Optional
|
|
||||||
private val maxAwaitTime: Long = 10000L,
|
private val maxAwaitTime: Long = 10000L,
|
||||||
@Optional
|
|
||||||
private val powValue: Double = 4.0,
|
private val powValue: Double = 4.0,
|
||||||
@Optional
|
|
||||||
private val powK: Double = 0.0016
|
private val powK: Double = 0.0016
|
||||||
) : RequestLimiter {
|
) : RequestLimiter {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -14,7 +14,6 @@ data class ForwardMessage(
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
val messageId: MessageIdentifier,
|
val messageId: MessageIdentifier,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
val disableNotification: Boolean = false
|
val disableNotification: Boolean = false
|
||||||
): SimpleRequest<RawMessage> {
|
): SimpleRequest<RawMessage> {
|
||||||
override fun method(): String = "forwardMessage"
|
override fun method(): String = "forwardMessage"
|
||||||
|
@ -4,7 +4,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleReque
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ALL_UPDATES_LIST
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ALL_UPDATES_LIST
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
|
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.update.RawUpdate
|
import com.github.insanusmokrassar.TelegramBotAPI.types.update.RawUpdate
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.KSerializer
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.internal.ArrayListSerializer
|
import kotlinx.serialization.internal.ArrayListSerializer
|
||||||
|
|
||||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_MESSAGE", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_MESSAGE"))
|
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_MESSAGE", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_MESSAGE"))
|
||||||
@ -28,13 +29,9 @@ const val UPDATE_PRE_CHECKOUT_QUERY = com.github.insanusmokrassar.TelegramBotAPI
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class GetUpdates(
|
data class GetUpdates(
|
||||||
@Optional
|
|
||||||
val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates
|
val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates
|
||||||
@Optional
|
|
||||||
val limit: Int? = null,
|
val limit: Int? = null,
|
||||||
@Optional
|
|
||||||
val timeout: Int? = null,
|
val timeout: Int? = null,
|
||||||
@Optional
|
|
||||||
val allowed_updates: List<String>? = ALL_UPDATES_LIST
|
val allowed_updates: List<String>? = ALL_UPDATES_LIST
|
||||||
): SimpleRequest<List<RawUpdate>> {
|
): SimpleRequest<List<RawUpdate>> {
|
||||||
override fun method(): String = "getUpdates"
|
override fun method(): String = "getUpdates"
|
||||||
|
@ -2,8 +2,10 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts
|
|||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.StorageFile
|
import com.github.insanusmokrassar.TelegramBotAPI.utils.StorageFile
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.StringDescriptor
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
@Serializable(InputFileSerializer::class)
|
||||||
sealed class InputFile {
|
sealed class InputFile {
|
||||||
abstract val fileId: String
|
abstract val fileId: String
|
||||||
}
|
}
|
||||||
@ -12,16 +14,17 @@ sealed class InputFile {
|
|||||||
/**
|
/**
|
||||||
* Contains file id or file url
|
* Contains file id or file url
|
||||||
*/
|
*/
|
||||||
@Serializable(FileIdSerializer::class)
|
@Serializable(InputFileSerializer::class)
|
||||||
data class FileId(
|
data class FileId(
|
||||||
override val fileId: String
|
override val fileId: String
|
||||||
) : InputFile()
|
) : InputFile()
|
||||||
|
|
||||||
fun String.toInputFile(): InputFile = FileId(this)
|
fun String.toInputFile(): InputFile = FileId(this)
|
||||||
|
|
||||||
@Serializer(FileId::class)
|
@Serializer(InputFile::class)
|
||||||
object FileIdSerializer : KSerializer<FileId> {
|
object InputFileSerializer : KSerializer<InputFile> {
|
||||||
override fun serialize(encoder: Encoder, obj: FileId) = encoder.encodeString(obj.fileId)
|
override val descriptor: SerialDescriptor = StringDescriptor.withName(FileId::class.toString())
|
||||||
|
override fun serialize(encoder: Encoder, obj: InputFile) = encoder.encodeString(obj.fileId)
|
||||||
override fun deserialize(decoder: Decoder): FileId = FileId(decoder.decodeString())
|
override fun deserialize(decoder: Decoder): FileId = FileId(decoder.decodeString())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +32,7 @@ object FileIdSerializer : KSerializer<FileId> {
|
|||||||
/**
|
/**
|
||||||
* Contains info about file for sending
|
* Contains info about file for sending
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable(InputFileSerializer::class)
|
||||||
data class MultipartFile (
|
data class MultipartFile (
|
||||||
val file: StorageFile,
|
val file: StorageFile,
|
||||||
val mimeType: String = file.contentType,
|
val mimeType: String = file.contentType,
|
||||||
|
@ -11,16 +11,12 @@ data class AnswerCallbackQuery(
|
|||||||
@SerialName(callbackQueryIdField)
|
@SerialName(callbackQueryIdField)
|
||||||
val callbackQueryId: CallbackQueryIdentifier,
|
val callbackQueryId: CallbackQueryIdentifier,
|
||||||
@SerialName(textField)
|
@SerialName(textField)
|
||||||
@Optional
|
|
||||||
val text: String? = null,
|
val text: String? = null,
|
||||||
@SerialName(showAlertField)
|
@SerialName(showAlertField)
|
||||||
@Optional
|
|
||||||
val showAlert: Boolean? = null,
|
val showAlert: Boolean? = null,
|
||||||
@SerialName(urlField)
|
@SerialName(urlField)
|
||||||
@Optional
|
|
||||||
val url: String? = null,
|
val url: String? = null,
|
||||||
@SerialName(cachedTimeField)
|
@SerialName(cachedTimeField)
|
||||||
@Optional
|
|
||||||
val cachedTimeSeconds: Int? = null
|
val cachedTimeSeconds: Int? = null
|
||||||
) : SimpleRequest<Boolean> {
|
) : SimpleRequest<Boolean> {
|
||||||
override fun method(): String = "answerCallbackQuery"
|
override fun method(): String = "answerCallbackQuery"
|
||||||
|
@ -17,19 +17,14 @@ data class AnswerInlineQuery(
|
|||||||
@SerialName(resultsField)
|
@SerialName(resultsField)
|
||||||
val results: List<InlineQueryResult> = emptyList(),
|
val results: List<InlineQueryResult> = emptyList(),
|
||||||
@SerialName(cachedTimeField)
|
@SerialName(cachedTimeField)
|
||||||
@Optional
|
|
||||||
val cachedTime: Int? = null,
|
val cachedTime: Int? = null,
|
||||||
@SerialName(isPersonalField)
|
@SerialName(isPersonalField)
|
||||||
@Optional
|
|
||||||
val isPersonal: Boolean? = null,
|
val isPersonal: Boolean? = null,
|
||||||
@SerialName(nextOffsetField)
|
@SerialName(nextOffsetField)
|
||||||
@Optional
|
|
||||||
val nextOffset: String? = null,
|
val nextOffset: String? = null,
|
||||||
@SerialName(switchPmTextField)
|
@SerialName(switchPmTextField)
|
||||||
@Optional
|
|
||||||
val switchPmText: String? = null,
|
val switchPmText: String? = null,
|
||||||
@SerialName(switchPmParameterField)
|
@SerialName(switchPmParameterField)
|
||||||
@Optional
|
|
||||||
val switchPmParameter: String? = null
|
val switchPmParameter: String? = null
|
||||||
): SimpleRequest<Boolean> {
|
): SimpleRequest<Boolean> {
|
||||||
override fun method(): String = "answerInlineQuery"
|
override fun method(): String = "answerInlineQuery"
|
||||||
|
@ -13,7 +13,6 @@ data class KickChatMember(
|
|||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
override val userId: UserId,
|
override val userId: UserId,
|
||||||
@SerialName(untilDateField)
|
@SerialName(untilDateField)
|
||||||
@Optional
|
|
||||||
override val untilDate: TelegramDate? = null
|
override val untilDate: TelegramDate? = null
|
||||||
) : ChatMemberRequest<Boolean>, UntilDate {
|
) : ChatMemberRequest<Boolean>, UntilDate {
|
||||||
override fun method(): String = "kickChatMember"
|
override fun method(): String = "kickChatMember"
|
||||||
|
@ -13,31 +13,22 @@ data class PromoteChatMember(
|
|||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
override val userId: UserId,
|
override val userId: UserId,
|
||||||
@SerialName(untilDateField)
|
@SerialName(untilDateField)
|
||||||
@Optional
|
|
||||||
override val untilDate: TelegramDate? = null,
|
override val untilDate: TelegramDate? = null,
|
||||||
@SerialName(canChangeInfoField)
|
@SerialName(canChangeInfoField)
|
||||||
@Optional
|
|
||||||
private val canChangeInfo: Boolean? = null,
|
private val canChangeInfo: Boolean? = null,
|
||||||
@SerialName(canPostMessagesField)
|
@SerialName(canPostMessagesField)
|
||||||
@Optional
|
|
||||||
private val canPostMessages: Boolean? = null,
|
private val canPostMessages: Boolean? = null,
|
||||||
@SerialName(canEditMessagesField)
|
@SerialName(canEditMessagesField)
|
||||||
@Optional
|
|
||||||
private val canEditMessages: Boolean? = null,
|
private val canEditMessages: Boolean? = null,
|
||||||
@SerialName(canDeleteMessagesField)
|
@SerialName(canDeleteMessagesField)
|
||||||
@Optional
|
|
||||||
private val canDeleteMessages: Boolean? = null,
|
private val canDeleteMessages: Boolean? = null,
|
||||||
@SerialName(canInviteUsersField)
|
@SerialName(canInviteUsersField)
|
||||||
@Optional
|
|
||||||
private val canInviteUsers: Boolean? = null,
|
private val canInviteUsers: Boolean? = null,
|
||||||
@SerialName(canRestrictMembersField)
|
@SerialName(canRestrictMembersField)
|
||||||
@Optional
|
|
||||||
private val canRestrictMembers: Boolean? = null,
|
private val canRestrictMembers: Boolean? = null,
|
||||||
@SerialName(canPinMessagesField)
|
@SerialName(canPinMessagesField)
|
||||||
@Optional
|
|
||||||
private val canPinMessages: Boolean? = null,
|
private val canPinMessages: Boolean? = null,
|
||||||
@SerialName(canPromoteMembersField)
|
@SerialName(canPromoteMembersField)
|
||||||
@Optional
|
|
||||||
private val canPromoteMembers: Boolean? = null
|
private val canPromoteMembers: Boolean? = null
|
||||||
) : ChatMemberRequest<Boolean>, UntilDate {
|
) : ChatMemberRequest<Boolean>, UntilDate {
|
||||||
override fun method(): String = "promoteChatMember"
|
override fun method(): String = "promoteChatMember"
|
||||||
|
@ -13,19 +13,14 @@ data class RestrictChatMember(
|
|||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
override val userId: UserId,
|
override val userId: UserId,
|
||||||
@SerialName(untilDateField)
|
@SerialName(untilDateField)
|
||||||
@Optional
|
|
||||||
override val untilDate: TelegramDate? = null,
|
override val untilDate: TelegramDate? = null,
|
||||||
@SerialName(canSendMessagesField)
|
@SerialName(canSendMessagesField)
|
||||||
@Optional
|
|
||||||
private val canSendMessages: Boolean? = null,
|
private val canSendMessages: Boolean? = null,
|
||||||
@SerialName(canSendMediaMessagesField)
|
@SerialName(canSendMediaMessagesField)
|
||||||
@Optional
|
|
||||||
private val canSendMediaMessages: Boolean? = null,
|
private val canSendMediaMessages: Boolean? = null,
|
||||||
@SerialName(canSendOtherMessagesField)
|
@SerialName(canSendOtherMessagesField)
|
||||||
@Optional
|
|
||||||
private val canSendOtherMessages: Boolean? = null,
|
private val canSendOtherMessages: Boolean? = null,
|
||||||
@SerialName(canAddWebPagePreviewsField)
|
@SerialName(canAddWebPagePreviewsField)
|
||||||
@Optional
|
|
||||||
private val canAddWebPagePreviews: Boolean? = null
|
private val canAddWebPagePreviews: Boolean? = null
|
||||||
) : ChatMemberRequest<Boolean>, UntilDate {
|
) : ChatMemberRequest<Boolean>, UntilDate {
|
||||||
override fun method(): String = "restrictChatMember"
|
override fun method(): String = "restrictChatMember"
|
||||||
|
@ -14,7 +14,6 @@ data class PinChatMessage (
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
val messageId: MessageIdentifier,
|
val messageId: MessageIdentifier,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false
|
override val disableNotification: Boolean = false
|
||||||
): ChatRequest, SimpleRequest<Boolean>, DisableNotification {
|
): ChatRequest, SimpleRequest<Boolean>, DisableNotification {
|
||||||
override fun method(): String = "pinChatMessage"
|
override fun method(): String = "pinChatMessage"
|
||||||
|
@ -13,11 +13,10 @@ import kotlinx.serialization.json.JsonObject
|
|||||||
data class SetChatPhoto (
|
data class SetChatPhoto (
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@Transient
|
|
||||||
val photo: MultipartFile = throw IllegalArgumentException("Unfortunately, this type of objects can't be parsed automatically")
|
val photo: MultipartFile = throw IllegalArgumentException("Unfortunately, this type of objects can't be parsed automatically")
|
||||||
): ChatRequest, MultipartRequest<Boolean> {
|
): ChatRequest, MultipartRequest<Boolean> {
|
||||||
override fun method(): String = "setChatPhoto"
|
override fun method(): String = "setChatPhoto"
|
||||||
override fun resultSerializer(): KSerializer<Boolean> = BooleanSerializer
|
override fun resultSerializer(): KSerializer<Boolean> = BooleanSerializer
|
||||||
override val mediaMap: Map<String, MultipartFile> = mapOf(photoField to photo)
|
override val mediaMap: Map<String, MultipartFile> = mapOf(photoField to photo)
|
||||||
override val paramsJson: JsonObject = this.toJson(serializer())
|
override val paramsJson: JsonObject = toJson(serializer())
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ data class EditChatMessageLiveLocation(
|
|||||||
@SerialName(longitudeField)
|
@SerialName(longitudeField)
|
||||||
override val longitude: Double,
|
override val longitude: Double,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage, EditReplyMessage, EditLocationMessage {
|
) : EditChatMessage, EditReplyMessage, EditLocationMessage {
|
||||||
override fun method(): String = "editMessageLiveLocation"
|
override fun method(): String = "editMessageLiveLocation"
|
||||||
|
@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class EditInlineMessageLiveLocation(
|
data class EditInlineMessageLiveLocation(
|
||||||
@ -14,7 +15,6 @@ data class EditInlineMessageLiveLocation(
|
|||||||
@SerialName(longitudeField)
|
@SerialName(longitudeField)
|
||||||
override val longitude: Double,
|
override val longitude: Double,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditReplyMessage, EditLocationMessage {
|
) : EditInlineMessage, EditReplyMessage, EditLocationMessage {
|
||||||
override fun method(): String = "editMessageLiveLocation"
|
override fun method(): String = "editMessageLiveLocation"
|
||||||
|
@ -14,7 +14,6 @@ data class StopChatMessageLiveLocation(
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageIdentifier,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage, EditReplyMessage {
|
) : EditChatMessage, EditReplyMessage {
|
||||||
override fun method(): String = "stopMessageLiveLocation"
|
override fun method(): String = "stopMessageLiveLocation"
|
||||||
|
@ -4,14 +4,14 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditIn
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditReplyMessage
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditReplyMessage
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class StopInlineMessageLiveLocation(
|
data class StopInlineMessageLiveLocation(
|
||||||
@SerialName(inlineMessageIdField)
|
@SerialName(inlineMessageIdField)
|
||||||
override val inlineMessageId: InlineMessageIdentifier,
|
override val inlineMessageId: InlineMessageIdentifier,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditReplyMessage {
|
) : EditInlineMessage, EditReplyMessage {
|
||||||
override fun method(): String = "stopMessageLiveLocation"
|
override fun method(): String = "stopMessageLiveLocation"
|
||||||
|
@ -16,7 +16,6 @@ data class EditChatMessageReplyMarkup(
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageIdentifier,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage, EditReplyMessage {
|
) : EditChatMessage, EditReplyMessage {
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditIn
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditReplyMessage
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditReplyMessage
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class EditInlineMessageReplyMarkup(
|
data class EditInlineMessageReplyMarkup(
|
||||||
@SerialName(inlineMessageIdField)
|
@SerialName(inlineMessageIdField)
|
||||||
override val inlineMessageId: InlineMessageIdentifier,
|
override val inlineMessageId: InlineMessageIdentifier,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditReplyMessage {
|
) : EditInlineMessage, EditReplyMessage {
|
||||||
override fun method(): String = editMessageReplyMarkupMethod
|
override fun method(): String = editMessageReplyMarkupMethod
|
||||||
|
@ -19,10 +19,8 @@ data class EditChatMessageCaption(
|
|||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
override val text: String,
|
override val text: String,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage, EditTextChatMessage, EditReplyMessage {
|
) : EditChatMessage, EditTextChatMessage, EditReplyMessage {
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class EditInlineMessageCaption(
|
data class EditInlineMessageCaption(
|
||||||
@ -14,10 +15,8 @@ data class EditInlineMessageCaption(
|
|||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
override val text: String,
|
override val text: String,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage {
|
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage {
|
||||||
override fun method(): String = editMessageCaptionMethod
|
override fun method(): String = editMessageCaptionMethod
|
||||||
|
@ -19,7 +19,6 @@ data class EditChatMessageMedia(
|
|||||||
@SerialName(mediaField)
|
@SerialName(mediaField)
|
||||||
override val media: InputMedia,
|
override val media: InputMedia,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage, EditReplyMessage, EditMediaMessage {
|
) : EditChatMessage, EditReplyMessage, EditMediaMessage {
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class EditInlineMessageMedia(
|
data class EditInlineMessageMedia(
|
||||||
@ -14,7 +15,6 @@ data class EditInlineMessageMedia(
|
|||||||
@SerialName(mediaField)
|
@SerialName(mediaField)
|
||||||
override val media: InputMedia,
|
override val media: InputMedia,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditReplyMessage, EditMediaMessage {
|
) : EditInlineMessage, EditReplyMessage, EditMediaMessage {
|
||||||
|
|
||||||
|
@ -19,13 +19,10 @@ data class EditChatMessageText(
|
|||||||
@SerialName(textField)
|
@SerialName(textField)
|
||||||
override val text: String,
|
override val text: String,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(disableWebPagePreviewField)
|
@SerialName(disableWebPagePreviewField)
|
||||||
@Optional
|
|
||||||
override val disableWebPagePreview: Boolean? = null,
|
override val disableWebPagePreview: Boolean? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditChatMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
|
) : EditChatMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class EditInlineMessageText(
|
data class EditInlineMessageText(
|
||||||
@ -15,13 +16,10 @@ data class EditInlineMessageText(
|
|||||||
@SerialName(textField)
|
@SerialName(textField)
|
||||||
override val text: String,
|
override val text: String,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(disableWebPagePreviewField)
|
@SerialName(disableWebPagePreviewField)
|
||||||
@Optional
|
|
||||||
override val disableWebPagePreview: Boolean? = null,
|
override val disableWebPagePreview: Boolean? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
|
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
|
||||||
override fun method(): String = editMessageMediaMethod
|
override fun method(): String = editMessageMediaMethod
|
||||||
|
@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.games
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.SetGameScore
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.SetGameScore
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class SetGameScoreByChatId (
|
data class SetGameScoreByChatId (
|
||||||
@ -16,9 +17,7 @@ data class SetGameScoreByChatId (
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageIdentifier,
|
||||||
@SerialName(forceField)
|
@SerialName(forceField)
|
||||||
@Optional
|
|
||||||
override val force: Boolean = false,
|
override val force: Boolean = false,
|
||||||
@SerialName(disableEditMessageField)
|
@SerialName(disableEditMessageField)
|
||||||
@Optional
|
|
||||||
override val disableEditMessage: Boolean = false
|
override val disableEditMessage: Boolean = false
|
||||||
) : SetGameScore, ByMessageId
|
) : SetGameScore, ByMessageId
|
||||||
|
@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.games
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.SetGameScore
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.SetGameScore
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class SetGameScoreByInlineMessageId (
|
data class SetGameScoreByInlineMessageId (
|
||||||
@ -14,9 +15,7 @@ data class SetGameScoreByInlineMessageId (
|
|||||||
@SerialName(inlineMessageIdField)
|
@SerialName(inlineMessageIdField)
|
||||||
override val inlineMessageId: InlineMessageIdentifier,
|
override val inlineMessageId: InlineMessageIdentifier,
|
||||||
@SerialName(forceField)
|
@SerialName(forceField)
|
||||||
@Optional
|
|
||||||
override val force: Boolean = false,
|
override val force: Boolean = false,
|
||||||
@SerialName(disableEditMessageField)
|
@SerialName(disableEditMessageField)
|
||||||
@Optional
|
|
||||||
override val disableEditMessage: Boolean = false
|
override val disableEditMessage: Boolean = false
|
||||||
) : SetGameScore, ByInlineMessageId
|
) : SetGameScore, ByInlineMessageId
|
||||||
|
@ -16,16 +16,12 @@ data class SendContact(
|
|||||||
@SerialName(firstNameField)
|
@SerialName(firstNameField)
|
||||||
val firstName: String,
|
val firstName: String,
|
||||||
@SerialName(lastNameField)
|
@SerialName(lastNameField)
|
||||||
@Optional
|
|
||||||
val lastName: String? = null,
|
val lastName: String? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : SendMessageRequest<RawMessage>,
|
) : SendMessageRequest<RawMessage>,
|
||||||
ReplyingMarkupSendMessageRequest<RawMessage>
|
ReplyingMarkupSendMessageRequest<RawMessage>
|
||||||
|
@ -16,16 +16,12 @@ data class SendLocation(
|
|||||||
@SerialName(longitudeField)
|
@SerialName(longitudeField)
|
||||||
override val longitude: Double,
|
override val longitude: Double,
|
||||||
@SerialName(livePeriodField)
|
@SerialName(livePeriodField)
|
||||||
@Optional
|
|
||||||
val livePeriod: Long? = null,
|
val livePeriod: Long? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : SendMessageRequest<RawMessage>,
|
) : SendMessageRequest<RawMessage>,
|
||||||
ReplyingMarkupSendMessageRequest<RawMessage>,
|
ReplyingMarkupSendMessageRequest<RawMessage>,
|
||||||
|
@ -16,19 +16,14 @@ data class SendMessage(
|
|||||||
@SerialName(textField)
|
@SerialName(textField)
|
||||||
override val text: String,
|
override val text: String,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(disableWebPagePreviewField)
|
@SerialName(disableWebPagePreviewField)
|
||||||
@Optional
|
|
||||||
override val disableWebPagePreview: Boolean? = null,
|
override val disableWebPagePreview: Boolean? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : SendMessageRequest<RawMessage>,
|
) : SendMessageRequest<RawMessage>,
|
||||||
ReplyingMarkupSendMessageRequest<RawMessage>,
|
ReplyingMarkupSendMessageRequest<RawMessage>,
|
||||||
|
@ -19,16 +19,12 @@ data class SendVenue(
|
|||||||
@SerialName(addressField)
|
@SerialName(addressField)
|
||||||
val address: String,
|
val address: String,
|
||||||
@SerialName(foursquareIdField)
|
@SerialName(foursquareIdField)
|
||||||
@Optional
|
|
||||||
val foursquareId: String? = null,
|
val foursquareId: String? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : SendMessageRequest<RawMessage>,
|
) : SendMessageRequest<RawMessage>,
|
||||||
PositionedSendMessageRequest<RawMessage>,
|
PositionedSendMessageRequest<RawMessage>,
|
||||||
|
@ -14,13 +14,10 @@ data class SendGame (
|
|||||||
@SerialName(gameShortNameField)
|
@SerialName(gameShortNameField)
|
||||||
val gameShortName: String,
|
val gameShortName: String,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : SendMessageRequest<RawMessage>,
|
) : SendMessageRequest<RawMessage>,
|
||||||
ReplyMarkup {
|
ReplyMarkup {
|
||||||
|
@ -58,34 +58,24 @@ data class SendAnimationData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(animationField)
|
@SerialName(animationField)
|
||||||
@Optional
|
|
||||||
val animation: String? = null,
|
val animation: String? = null,
|
||||||
@SerialName(thumbField)
|
@SerialName(thumbField)
|
||||||
@Optional
|
|
||||||
override val thumb: String? = null,
|
override val thumb: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(durationField)
|
@SerialName(durationField)
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(widthField)
|
@SerialName(widthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(heightField)
|
@SerialName(heightField)
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -59,34 +59,24 @@ data class SendAudioData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(audioField)
|
@SerialName(audioField)
|
||||||
@Optional
|
|
||||||
val audio: String? = null,
|
val audio: String? = null,
|
||||||
@SerialName(thumbField)
|
@SerialName(thumbField)
|
||||||
@Optional
|
|
||||||
override val thumb: String? = null,
|
override val thumb: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(durationField)
|
@SerialName(durationField)
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(performerField)
|
@SerialName(performerField)
|
||||||
@Optional
|
|
||||||
override val performer: String? = null,
|
override val performer: String? = null,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -52,25 +52,18 @@ data class SendDocumentData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(documentField)
|
@SerialName(documentField)
|
||||||
@Optional
|
|
||||||
val document: String? = null,
|
val document: String? = null,
|
||||||
@SerialName(thumbField)
|
@SerialName(thumbField)
|
||||||
@Optional
|
|
||||||
override val thumb: String? = null,
|
override val thumb: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -61,10 +61,8 @@ data class SendMediaGroupData internal constructor(
|
|||||||
@Transient
|
@Transient
|
||||||
val media: List<MediaGroupMemberInputMedia> = emptyList(),
|
val media: List<MediaGroupMemberInputMedia> = emptyList(),
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null
|
override val replyToMessageId: MessageIdentifier? = null
|
||||||
) : DataRequest<List<RawMessage>>,
|
) : DataRequest<List<RawMessage>>,
|
||||||
SendMessageRequest<List<RawMessage>>
|
SendMessageRequest<List<RawMessage>>
|
||||||
|
@ -41,22 +41,16 @@ data class SendPhotoData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(photoField)
|
@SerialName(photoField)
|
||||||
@Optional
|
|
||||||
val photo: String? = null,
|
val photo: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -34,16 +34,12 @@ data class SendStickerByFileId internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(stickerField)
|
@SerialName(stickerField)
|
||||||
@Optional
|
|
||||||
val sticker: FileId? = null,
|
val sticker: FileId? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : SendMessageRequest<RawMessage>, ReplyingMarkupSendMessageRequest<RawMessage> {
|
) : SendMessageRequest<RawMessage>, ReplyingMarkupSendMessageRequest<RawMessage> {
|
||||||
override fun method(): String = "sendSticker"
|
override fun method(): String = "sendSticker"
|
||||||
|
@ -60,37 +60,26 @@ data class SendVideoData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(videoField)
|
@SerialName(videoField)
|
||||||
@Optional
|
|
||||||
val video: String? = null,
|
val video: String? = null,
|
||||||
@SerialName(thumbField)
|
@SerialName(thumbField)
|
||||||
@Optional
|
|
||||||
override val thumb: String? = null,
|
override val thumb: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(durationField)
|
@SerialName(durationField)
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(widthField)
|
@SerialName(widthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(heightField)
|
@SerialName(heightField)
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(supportStreamingField)
|
@SerialName(supportStreamingField)
|
||||||
@Optional
|
|
||||||
val supportStreaming: Boolean? = null,
|
val supportStreaming: Boolean? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -56,31 +56,22 @@ data class SendVideoNoteData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(videoNoteField)
|
@SerialName(videoNoteField)
|
||||||
@Optional
|
|
||||||
val videoNote: String? = null,
|
val videoNote: String? = null,
|
||||||
@SerialName(thumbField)
|
@SerialName(thumbField)
|
||||||
@Optional
|
|
||||||
override val thumb: String? = null,
|
override val thumb: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(durationField)
|
@SerialName(durationField)
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(lengthField)
|
@SerialName(lengthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -54,28 +54,20 @@ data class SendVoiceData internal constructor(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(voiceField)
|
@SerialName(voiceField)
|
||||||
@Optional
|
|
||||||
val voice: String? = null,
|
val voice: String? = null,
|
||||||
@SerialName(thumbField)
|
@SerialName(thumbField)
|
||||||
@Optional
|
|
||||||
override val thumb: String? = null,
|
override val thumb: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val text: String? = null,
|
override val text: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(durationField)
|
@SerialName(durationField)
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: KeyboardMarkup? = null
|
override val replyMarkup: KeyboardMarkup? = null
|
||||||
) : DataRequest<RawMessage>,
|
) : DataRequest<RawMessage>,
|
||||||
SendMessageRequest<RawMessage>,
|
SendMessageRequest<RawMessage>,
|
||||||
|
@ -9,7 +9,6 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPrice
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPricesSerializer
|
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPricesSerializer
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.*
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.Optional
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,37 +35,26 @@ data class SendInvoice(
|
|||||||
@SerialName(pricesField)
|
@SerialName(pricesField)
|
||||||
override val prices: List<LabeledPrice>,
|
override val prices: List<LabeledPrice>,
|
||||||
@SerialName(providerDataField)
|
@SerialName(providerDataField)
|
||||||
@Optional
|
|
||||||
val providerData: String? = null,
|
val providerData: String? = null,
|
||||||
@SerialName(requireNameField)
|
@SerialName(requireNameField)
|
||||||
@Optional
|
|
||||||
val requireName: Boolean = false,
|
val requireName: Boolean = false,
|
||||||
@SerialName(requirePhoneNumberField)
|
@SerialName(requirePhoneNumberField)
|
||||||
@Optional
|
|
||||||
val requirePhoneNumber: Boolean = false,
|
val requirePhoneNumber: Boolean = false,
|
||||||
@SerialName(requireEmailField)
|
@SerialName(requireEmailField)
|
||||||
@Optional
|
|
||||||
val requireEmail: Boolean = false,
|
val requireEmail: Boolean = false,
|
||||||
@SerialName(requireShippingAddressField)
|
@SerialName(requireShippingAddressField)
|
||||||
@Optional
|
|
||||||
val requireShippingAddress: Boolean = false,
|
val requireShippingAddress: Boolean = false,
|
||||||
@SerialName(shouldSendPhoneNumberToProviderField)
|
@SerialName(shouldSendPhoneNumberToProviderField)
|
||||||
@Optional
|
|
||||||
val shouldSendPhoneNumberToProvider: Boolean = false,
|
val shouldSendPhoneNumberToProvider: Boolean = false,
|
||||||
@SerialName(shouldSendEmailToProviderField)
|
@SerialName(shouldSendEmailToProviderField)
|
||||||
@Optional
|
|
||||||
val shouldSendEmailToProvider: Boolean = false,
|
val shouldSendEmailToProvider: Boolean = false,
|
||||||
@SerialName(priceDependOnShipAddressField)
|
@SerialName(priceDependOnShipAddressField)
|
||||||
@Optional
|
|
||||||
val priceDependOnShipAddress: Boolean = false,
|
val priceDependOnShipAddress: Boolean = false,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
@Optional
|
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
@Optional
|
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) : Currencied,
|
) : Currencied,
|
||||||
Priced,
|
Priced,
|
||||||
|
@ -5,7 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.common.CommonMultipar
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts.StickerSetAction
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts.StickerSetAction
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
fun AddStickerToSet(
|
fun AddStickerToSet(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
@ -33,10 +34,8 @@ data class AddStickerToSet internal constructor(
|
|||||||
@SerialName(emojisField)
|
@SerialName(emojisField)
|
||||||
override val emojis: String,
|
override val emojis: String,
|
||||||
@SerialName(pngStickerField)
|
@SerialName(pngStickerField)
|
||||||
@Optional
|
|
||||||
val sticker: FileId? = null,
|
val sticker: FileId? = null,
|
||||||
@SerialName(maskPositionField)
|
@SerialName(maskPositionField)
|
||||||
@Optional
|
|
||||||
override val maskPosition: MaskPosition? = null
|
override val maskPosition: MaskPosition? = null
|
||||||
) : StickerSetAction {
|
) : StickerSetAction {
|
||||||
init {
|
init {
|
||||||
|
@ -5,7 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.common.CommonMultipar
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts.StickerSetAction
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts.StickerSetAction
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
fun CreateNewStickerSet(
|
fun CreateNewStickerSet(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
@ -34,13 +35,10 @@ data class CreateNewStickerSet internal constructor(
|
|||||||
@SerialName(emojisField)
|
@SerialName(emojisField)
|
||||||
override val emojis: String,
|
override val emojis: String,
|
||||||
@SerialName(pngStickerField)
|
@SerialName(pngStickerField)
|
||||||
@Optional
|
|
||||||
val sticker: FileId? = null,
|
val sticker: FileId? = null,
|
||||||
@SerialName(containsMasksField)
|
@SerialName(containsMasksField)
|
||||||
@Optional
|
|
||||||
val containsMasks: Boolean? = null,
|
val containsMasks: Boolean? = null,
|
||||||
@SerialName(maskPositionField)
|
@SerialName(maskPositionField)
|
||||||
@Optional
|
|
||||||
override val maskPosition: MaskPosition? = null
|
override val maskPosition: MaskPosition? = null
|
||||||
) : StickerSetAction {
|
) : StickerSetAction {
|
||||||
init {
|
init {
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.github.insanusmokrassar.TelegramBotAPI.requests.webhook
|
||||||
|
|
||||||
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||||
|
import kotlinx.serialization.KSerializer
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.internal.BooleanSerializer
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
class DeleteWebhook : SimpleRequest<Boolean> {
|
||||||
|
override fun method(): String = "deleteWebhook"
|
||||||
|
|
||||||
|
override fun resultSerializer(): KSerializer<Boolean> = BooleanSerializer
|
||||||
|
}
|
@ -44,13 +44,10 @@ data class SetWebhook internal constructor(
|
|||||||
@SerialName(urlField)
|
@SerialName(urlField)
|
||||||
val url: String,
|
val url: String,
|
||||||
@SerialName(certificateField)
|
@SerialName(certificateField)
|
||||||
@Optional
|
|
||||||
val certificateFile: String? = null,
|
val certificateFile: String? = null,
|
||||||
@SerialName(maxAllowedConnectionsField)
|
@SerialName(maxAllowedConnectionsField)
|
||||||
@Optional
|
|
||||||
val maxAllowedConnections: Int? = null,
|
val maxAllowedConnections: Int? = null,
|
||||||
@SerialName(allowedUpdatesField)
|
@SerialName(allowedUpdatesField)
|
||||||
@Optional
|
|
||||||
val allowedUpdates: List<String>? = null
|
val allowedUpdates: List<String>? = null
|
||||||
) : DataRequest<Boolean> {
|
) : DataRequest<Boolean> {
|
||||||
override fun method(): String = "setWebhook"
|
override fun method(): String = "setWebhook"
|
||||||
|
@ -10,17 +10,13 @@ data class RawCallbackQuery(
|
|||||||
val id: CallbackQueryIdentifier,
|
val id: CallbackQueryIdentifier,
|
||||||
@SerialName(fromField)
|
@SerialName(fromField)
|
||||||
val from: User,
|
val from: User,
|
||||||
@Optional
|
|
||||||
val message: RawMessage? = null,
|
val message: RawMessage? = null,
|
||||||
@SerialName(inlineMessageIdField)
|
@SerialName(inlineMessageIdField)
|
||||||
@Optional
|
|
||||||
val inlineMessageId: InlineMessageIdentifier? = null,
|
val inlineMessageId: InlineMessageIdentifier? = null,
|
||||||
@SerialName("chat_instance")
|
@SerialName("chat_instance")
|
||||||
val chatInstance: String,
|
val chatInstance: String,
|
||||||
@Optional
|
|
||||||
val data: String? = null,
|
val data: String? = null,
|
||||||
@SerialName("game_short_name")
|
@SerialName("game_short_name")
|
||||||
@Optional
|
|
||||||
val gameShortName: String? = null
|
val gameShortName: String? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -7,46 +7,32 @@ import kotlinx.serialization.*
|
|||||||
data class RawChatMember(
|
data class RawChatMember(
|
||||||
val user: User,
|
val user: User,
|
||||||
private val status: String,
|
private val status: String,
|
||||||
@Optional
|
|
||||||
private val until_date: TelegramDate? = null,
|
private val until_date: TelegramDate? = null,
|
||||||
@SerialName(canBeEditedField)
|
@SerialName(canBeEditedField)
|
||||||
@Optional
|
|
||||||
private val canBeEdited: Boolean = false,
|
private val canBeEdited: Boolean = false,
|
||||||
@SerialName(canChangeInfoField)
|
@SerialName(canChangeInfoField)
|
||||||
@Optional
|
|
||||||
private val canChangeInfo: Boolean = false,
|
private val canChangeInfo: Boolean = false,
|
||||||
@SerialName(canPostMessagesField)
|
@SerialName(canPostMessagesField)
|
||||||
@Optional
|
|
||||||
private val canPostMessages: Boolean = false,
|
private val canPostMessages: Boolean = false,
|
||||||
@SerialName(canEditMessagesField)
|
@SerialName(canEditMessagesField)
|
||||||
@Optional
|
|
||||||
private val canEditMessages: Boolean = false,
|
private val canEditMessages: Boolean = false,
|
||||||
@SerialName(canDeleteMessagesField)
|
@SerialName(canDeleteMessagesField)
|
||||||
@Optional
|
|
||||||
private val canDeleteMessages: Boolean = false,
|
private val canDeleteMessages: Boolean = false,
|
||||||
@SerialName(canInviteUsersField)
|
@SerialName(canInviteUsersField)
|
||||||
@Optional
|
|
||||||
private val canInviteUsers: Boolean = false,
|
private val canInviteUsers: Boolean = false,
|
||||||
@SerialName(canRestrictMembersField)
|
@SerialName(canRestrictMembersField)
|
||||||
@Optional
|
|
||||||
private val canRestrictMembers: Boolean = false,
|
private val canRestrictMembers: Boolean = false,
|
||||||
@SerialName(canPinMessagesField)
|
@SerialName(canPinMessagesField)
|
||||||
@Optional
|
|
||||||
private val canPinMessages: Boolean = false,
|
private val canPinMessages: Boolean = false,
|
||||||
@SerialName(canPromoteMembersField)
|
@SerialName(canPromoteMembersField)
|
||||||
@Optional
|
|
||||||
private val canPromoteMembers: Boolean = false,
|
private val canPromoteMembers: Boolean = false,
|
||||||
@SerialName(canSendMessagesField)
|
@SerialName(canSendMessagesField)
|
||||||
@Optional
|
|
||||||
private val canSendMessages: Boolean = false,
|
private val canSendMessages: Boolean = false,
|
||||||
@SerialName(canSendMediaMessagesField)
|
@SerialName(canSendMediaMessagesField)
|
||||||
@Optional
|
|
||||||
private val canSendMediaMessages: Boolean = false,
|
private val canSendMediaMessages: Boolean = false,
|
||||||
@SerialName(canSendOtherMessagesField)
|
@SerialName(canSendOtherMessagesField)
|
||||||
@Optional
|
|
||||||
private val canSendOtherMessages: Boolean = false,
|
private val canSendOtherMessages: Boolean = false,
|
||||||
@SerialName(canAddWebPagePreviewsField)
|
@SerialName(canAddWebPagePreviewsField)
|
||||||
@Optional
|
|
||||||
private val canAddWebPagePreviews: Boolean = false
|
private val canAddWebPagePreviews: Boolean = false
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -184,7 +184,7 @@ const val certificateField = "certificate"
|
|||||||
const val pointField = "point"
|
const val pointField = "point"
|
||||||
const val xShiftField = "x_shift"
|
const val xShiftField = "x_shift"
|
||||||
const val yShiftField = "y_shift"
|
const val yShiftField = "y_shift"
|
||||||
const val scaleField = "y_shift"
|
const val scaleField = "scale"
|
||||||
|
|
||||||
|
|
||||||
const val currencyField = "currency"
|
const val currencyField = "currency"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonContactData
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonContactData
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Contact(
|
data class Contact(
|
||||||
@ -10,12 +11,9 @@ data class Contact(
|
|||||||
@SerialName(firstNameField)
|
@SerialName(firstNameField)
|
||||||
override val firstName: String,
|
override val firstName: String,
|
||||||
@SerialName(lastNameField)
|
@SerialName(lastNameField)
|
||||||
@Optional
|
|
||||||
override val lastName: String? = null,
|
override val lastName: String? = null,
|
||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
@Optional
|
|
||||||
val userId: UserId? = null,
|
val userId: UserId? = null,
|
||||||
@SerialName(vcardField)
|
@SerialName(vcardField)
|
||||||
@Optional
|
|
||||||
override val vcard: String? = null
|
override val vcard: String? = null
|
||||||
) : CommonContactData
|
) : CommonContactData
|
||||||
|
@ -13,10 +13,8 @@ data class RawChosenInlineResult(
|
|||||||
@SerialName(queryField)
|
@SerialName(queryField)
|
||||||
val query: String,
|
val query: String,
|
||||||
@SerialName(locationField)
|
@SerialName(locationField)
|
||||||
@Optional
|
|
||||||
val location: Location? = null,
|
val location: Location? = null,
|
||||||
@SerialName(inlineMessageIdField)
|
@SerialName(inlineMessageIdField)
|
||||||
@Optional
|
|
||||||
val inlineMessageId: InlineMessageIdentifier? = null
|
val inlineMessageId: InlineMessageIdentifier? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -4,7 +4,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
class InlineQueryResultArticle(
|
class InlineQueryResultArticle(
|
||||||
@ -15,25 +16,18 @@ class InlineQueryResultArticle(
|
|||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
override val inputMessageContent: InputMessageContent,
|
override val inputMessageContent: InputMessageContent,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(urlField)
|
@SerialName(urlField)
|
||||||
@Optional
|
|
||||||
override val url: String? = null,
|
override val url: String? = null,
|
||||||
@SerialName(hideUrlField)
|
@SerialName(hideUrlField)
|
||||||
@Optional
|
|
||||||
val hideUrl: Boolean? = null,
|
val hideUrl: Boolean? = null,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
@Optional
|
|
||||||
override val thumbUrl: String? = null,
|
override val thumbUrl: String? = null,
|
||||||
@SerialName(thumbWidthField)
|
@SerialName(thumbWidthField)
|
||||||
@Optional
|
|
||||||
override val thumbWidth: Int? = null,
|
override val thumbWidth: Int? = null,
|
||||||
@SerialName(thumbHeightField)
|
@SerialName(thumbHeightField)
|
||||||
@Optional
|
|
||||||
override val thumbHeight: Int? = null
|
override val thumbHeight: Int? = null
|
||||||
) : InlineQueryResult,
|
) : InlineQueryResult,
|
||||||
ThumbSizedInlineQueryResult,
|
ThumbSizedInlineQueryResult,
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultAudioCachedImpl(
|
data class InlineQueryResultAudioCachedImpl(
|
||||||
@ -17,16 +18,12 @@ data class InlineQueryResultAudioCachedImpl(
|
|||||||
@SerialName(audioFileIdField)
|
@SerialName(audioFileIdField)
|
||||||
override val fileId: FileId,
|
override val fileId: FileId,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultAudioCached {
|
) : InlineQueryResultAudioCached {
|
||||||
override val type: String = inlineQueryResultAudioType
|
override val type: String = inlineQueryResultAudioType
|
||||||
|
@ -7,7 +7,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultAudioImpl(
|
data class InlineQueryResultAudioImpl(
|
||||||
@ -18,22 +19,16 @@ data class InlineQueryResultAudioImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(performerField)
|
@SerialName(performerField)
|
||||||
@Optional
|
|
||||||
override val performer: String? = null,
|
override val performer: String? = null,
|
||||||
@SerialName(audioDurationField)
|
@SerialName(audioDurationField)
|
||||||
@Optional
|
|
||||||
override val duration: Int? = null,
|
override val duration: Int? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultAudio {
|
) : InlineQueryResultAudio {
|
||||||
override val type: String = inlineQueryResultAudioType
|
override val type: String = inlineQueryResultAudioType
|
||||||
|
@ -5,7 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultContact(
|
data class InlineQueryResultContact(
|
||||||
@ -16,25 +17,18 @@ data class InlineQueryResultContact(
|
|||||||
@SerialName(firstNameField)
|
@SerialName(firstNameField)
|
||||||
override val firstName: String,
|
override val firstName: String,
|
||||||
@SerialName(lastNameField)
|
@SerialName(lastNameField)
|
||||||
@Optional
|
|
||||||
override val lastName: String? = null,
|
override val lastName: String? = null,
|
||||||
@SerialName(vcardField)
|
@SerialName(vcardField)
|
||||||
@Optional
|
|
||||||
override val vcard: String? = null,
|
override val vcard: String? = null,
|
||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
@Optional
|
|
||||||
override val thumbUrl: String? = null,
|
override val thumbUrl: String? = null,
|
||||||
@SerialName(thumbWidthField)
|
@SerialName(thumbWidthField)
|
||||||
@Optional
|
|
||||||
override val thumbWidth: Int? = null,
|
override val thumbWidth: Int? = null,
|
||||||
@SerialName(thumbHeightField)
|
@SerialName(thumbHeightField)
|
||||||
@Optional
|
|
||||||
override val thumbHeight: Int? = null,
|
override val thumbHeight: Int? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResult,
|
) : InlineQueryResult,
|
||||||
CommonContactData,
|
CommonContactData,
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultDocumentCachedImpl(
|
data class InlineQueryResultDocumentCachedImpl(
|
||||||
@ -19,19 +20,14 @@ data class InlineQueryResultDocumentCachedImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultDocumentCached {
|
) : InlineQueryResultDocumentCached {
|
||||||
override val type: String = inlineQueryResultDocumentType
|
override val type: String = inlineQueryResultDocumentType
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.mimeTypeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.mimeTypeField
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultDocumentImpl(
|
data class InlineQueryResultDocumentImpl(
|
||||||
@ -21,28 +22,20 @@ data class InlineQueryResultDocumentImpl(
|
|||||||
@SerialName(mimeTypeField)
|
@SerialName(mimeTypeField)
|
||||||
override val mimeType: String,
|
override val mimeType: String,
|
||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
@Optional
|
|
||||||
override val thumbUrl: String? = null,
|
override val thumbUrl: String? = null,
|
||||||
@SerialName(thumbWidthField)
|
@SerialName(thumbWidthField)
|
||||||
@Optional
|
|
||||||
override val thumbWidth: Int? = null,
|
override val thumbWidth: Int? = null,
|
||||||
@SerialName(thumbHeightField)
|
@SerialName(thumbHeightField)
|
||||||
@Optional
|
|
||||||
override val thumbHeight: Int? = null,
|
override val thumbHeight: Int? = null,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultDocument {
|
) : InlineQueryResultDocument {
|
||||||
override val type: String = inlineQueryResultDocumentType
|
override val type: String = inlineQueryResultDocumentType
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultGifCachedImpl(
|
data class InlineQueryResultGifCachedImpl(
|
||||||
@ -17,19 +18,14 @@ data class InlineQueryResultGifCachedImpl(
|
|||||||
@SerialName(gifFileIdField)
|
@SerialName(gifFileIdField)
|
||||||
override val fileId: FileId,
|
override val fileId: FileId,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultGifCached {
|
) : InlineQueryResultGifCached {
|
||||||
override val type: String = inlineQueryResultGifType
|
override val type: String = inlineQueryResultGifType
|
||||||
|
@ -7,7 +7,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultGifImpl(
|
data class InlineQueryResultGifImpl(
|
||||||
@ -18,28 +19,20 @@ data class InlineQueryResultGifImpl(
|
|||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
override val thumbUrl: String,
|
override val thumbUrl: String,
|
||||||
@SerialName(gifWidthField)
|
@SerialName(gifWidthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(gifHeightField)
|
@SerialName(gifHeightField)
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(gifDurationField)
|
@SerialName(gifDurationField)
|
||||||
@Optional
|
|
||||||
override val duration: Int? = null,
|
override val duration: Int? = null,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultGif {
|
) : InlineQueryResultGif {
|
||||||
override val type: String = inlineQueryResultGifType
|
override val type: String = inlineQueryResultGifType
|
||||||
|
@ -6,7 +6,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultLocation(
|
data class InlineQueryResultLocation(
|
||||||
@ -19,22 +20,16 @@ data class InlineQueryResultLocation(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(livePeriodField)
|
@SerialName(livePeriodField)
|
||||||
@Optional
|
|
||||||
override val livePeriod: Int? = null,
|
override val livePeriod: Int? = null,
|
||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
@Optional
|
|
||||||
override val thumbUrl: String? = null,
|
override val thumbUrl: String? = null,
|
||||||
@SerialName(thumbWidthField)
|
@SerialName(thumbWidthField)
|
||||||
@Optional
|
|
||||||
override val thumbWidth: Int? = null,
|
override val thumbWidth: Int? = null,
|
||||||
@SerialName(thumbHeightField)
|
@SerialName(thumbHeightField)
|
||||||
@Optional
|
|
||||||
override val thumbHeight: Int? = null,
|
override val thumbHeight: Int? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResult,
|
) : InlineQueryResult,
|
||||||
Locationed,
|
Locationed,
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultMpeg4GifCachedImpl(
|
data class InlineQueryResultMpeg4GifCachedImpl(
|
||||||
@ -17,19 +18,14 @@ data class InlineQueryResultMpeg4GifCachedImpl(
|
|||||||
@SerialName(mpeg4GifFileIdField)
|
@SerialName(mpeg4GifFileIdField)
|
||||||
override val fileId: FileId,
|
override val fileId: FileId,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultMpeg4GifCached {
|
) : InlineQueryResultMpeg4GifCached {
|
||||||
override val type: String = inlineQueryResultMpeg4GifType
|
override val type: String = inlineQueryResultMpeg4GifType
|
||||||
|
@ -7,7 +7,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultMpeg4GifImpl(
|
data class InlineQueryResultMpeg4GifImpl(
|
||||||
@ -18,28 +19,20 @@ data class InlineQueryResultMpeg4GifImpl(
|
|||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
override val thumbUrl: String,
|
override val thumbUrl: String,
|
||||||
@SerialName(mpeg4GifWidthField)
|
@SerialName(mpeg4GifWidthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(mpeg4GifHeightField)
|
@SerialName(mpeg4GifHeightField)
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(mpeg4GifDurationField)
|
@SerialName(mpeg4GifDurationField)
|
||||||
@Optional
|
|
||||||
override val duration: Int? = null,
|
override val duration: Int? = null,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultMpeg4Gif {
|
) : InlineQueryResultMpeg4Gif {
|
||||||
override val type: String = inlineQueryResultMpeg4GifType
|
override val type: String = inlineQueryResultMpeg4GifType
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultPhotoCachedImpl(
|
data class InlineQueryResultPhotoCachedImpl(
|
||||||
@ -17,22 +18,16 @@ data class InlineQueryResultPhotoCachedImpl(
|
|||||||
@SerialName(photoFileIdField)
|
@SerialName(photoFileIdField)
|
||||||
override val fileId: FileId,
|
override val fileId: FileId,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultPhotoCached {
|
) : InlineQueryResultPhotoCached {
|
||||||
override val type: String = inlineQueryResultPhotoType
|
override val type: String = inlineQueryResultPhotoType
|
||||||
|
@ -7,7 +7,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultPhotoImpl(
|
data class InlineQueryResultPhotoImpl(
|
||||||
@ -18,28 +19,20 @@ data class InlineQueryResultPhotoImpl(
|
|||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
override val thumbUrl: String,
|
override val thumbUrl: String,
|
||||||
@SerialName(photoWidthField)
|
@SerialName(photoWidthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(photoHeightField)
|
@SerialName(photoHeightField)
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultPhoto {
|
) : InlineQueryResultPhoto {
|
||||||
override val type: String = inlineQueryResultPhotoType
|
override val type: String = inlineQueryResultPhotoType
|
||||||
|
@ -5,7 +5,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultStickerCached(
|
data class InlineQueryResultStickerCached(
|
||||||
@ -14,10 +15,8 @@ data class InlineQueryResultStickerCached(
|
|||||||
@SerialName(stickerFileIdField)
|
@SerialName(stickerFileIdField)
|
||||||
override val fileId: FileId,
|
override val fileId: FileId,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResult, WithInputMessageContentInlineQueryResult, WithFileIdInlineQueryResult {
|
) : InlineQueryResult, WithInputMessageContentInlineQueryResult, WithFileIdInlineQueryResult {
|
||||||
override val type: String = "sticker"
|
override val type: String = "sticker"
|
||||||
|
@ -6,7 +6,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVenue(
|
data class InlineQueryResultVenue(
|
||||||
@ -21,25 +22,18 @@ data class InlineQueryResultVenue(
|
|||||||
@SerialName(addressField)
|
@SerialName(addressField)
|
||||||
override val address: String,
|
override val address: String,
|
||||||
@SerialName(foursquareIdField)
|
@SerialName(foursquareIdField)
|
||||||
@Optional
|
|
||||||
override val foursquareId: String? = null,
|
override val foursquareId: String? = null,
|
||||||
@SerialName(foursquareTypeField)
|
@SerialName(foursquareTypeField)
|
||||||
@Optional
|
|
||||||
override val foursquareType: String? = null,
|
override val foursquareType: String? = null,
|
||||||
@SerialName(thumbUrlField)
|
@SerialName(thumbUrlField)
|
||||||
@Optional
|
|
||||||
override val thumbUrl: String? = null,
|
override val thumbUrl: String? = null,
|
||||||
@SerialName(thumbWidthField)
|
@SerialName(thumbWidthField)
|
||||||
@Optional
|
|
||||||
override val thumbWidth: Int? = null,
|
override val thumbWidth: Int? = null,
|
||||||
@SerialName(thumbHeightField)
|
@SerialName(thumbHeightField)
|
||||||
@Optional
|
|
||||||
override val thumbHeight: Int? = null,
|
override val thumbHeight: Int? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResult,
|
) : InlineQueryResult,
|
||||||
Locationed,
|
Locationed,
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVideoCachedImpl(
|
data class InlineQueryResultVideoCachedImpl(
|
||||||
@ -19,19 +20,14 @@ data class InlineQueryResultVideoCachedImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVideoCached {
|
) : InlineQueryResultVideoCached {
|
||||||
override val type: String = inlineQueryResultVideoType
|
override val type: String = inlineQueryResultVideoType
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.mimeTypeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.mimeTypeField
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVideoImpl(
|
data class InlineQueryResultVideoImpl(
|
||||||
@ -23,28 +24,20 @@ data class InlineQueryResultVideoImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(videoWidthField)
|
@SerialName(videoWidthField)
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(videoHeightField)
|
@SerialName(videoHeightField)
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(videoDurationField)
|
@SerialName(videoDurationField)
|
||||||
@Optional
|
|
||||||
override val duration: Int? = null,
|
override val duration: Int? = null,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@Optional
|
|
||||||
override val description: String? = null,
|
override val description: String? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVideo {
|
) : InlineQueryResultVideo {
|
||||||
override val type: String = inlineQueryResultVideoType
|
override val type: String = inlineQueryResultVideoType
|
||||||
|
@ -8,7 +8,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVoiceCachedImpl(
|
data class InlineQueryResultVoiceCachedImpl(
|
||||||
@ -19,16 +20,12 @@ data class InlineQueryResultVoiceCachedImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVoiceCached {
|
) : InlineQueryResultVoiceCached {
|
||||||
override val type: String = inlineQueryResultVoiceType
|
override val type: String = inlineQueryResultVoiceType
|
||||||
|
@ -7,7 +7,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultVoiceImpl(
|
data class InlineQueryResultVoiceImpl(
|
||||||
@ -18,19 +19,14 @@ data class InlineQueryResultVoiceImpl(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(voiceDurationField)
|
@SerialName(voiceDurationField)
|
||||||
@Optional
|
|
||||||
override val duration: Int? = null,
|
override val duration: Int? = null,
|
||||||
@SerialName(captionField)
|
@SerialName(captionField)
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
@Optional
|
|
||||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
@SerialName(inputMessageContentField)
|
@SerialName(inputMessageContentField)
|
||||||
@Optional
|
|
||||||
override val inputMessageContent: InputMessageContent? = null
|
override val inputMessageContent: InputMessageContent? = null
|
||||||
) : InlineQueryResultVoice {
|
) : InlineQueryResultVoice {
|
||||||
override val type: String = inlineQueryResultVoiceType
|
override val type: String = inlineQueryResultVoiceType
|
||||||
|
@ -3,11 +3,12 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQue
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.StringDescriptor
|
||||||
import sun.reflect.generics.reflectiveObjects.NotImplementedException
|
import sun.reflect.generics.reflectiveObjects.NotImplementedException
|
||||||
|
|
||||||
@Serializer(InlineQueryResult::class)
|
@Serializer(InlineQueryResult::class)
|
||||||
object InlineQueryResultSerializer :
|
object InlineQueryResultSerializer : KSerializer<InlineQueryResult> {
|
||||||
KSerializer<InlineQueryResult> {
|
override val descriptor: SerialDescriptor = StringDescriptor.withName(InlineQueryResult::class.toString())
|
||||||
override fun serialize(encoder: Encoder, obj: InlineQueryResult) {
|
override fun serialize(encoder: Encoder, obj: InlineQueryResult) {
|
||||||
when(obj) {
|
when(obj) {
|
||||||
is InlineQueryResultArticle -> InlineQueryResultArticle.serializer().serialize(encoder, obj)
|
is InlineQueryResultArticle -> InlineQueryResultArticle.serializer().serialize(encoder, obj)
|
||||||
|
@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMess
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonContactData
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonContactData
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InputContactMessageContent(
|
data class InputContactMessageContent(
|
||||||
@ -12,9 +13,7 @@ data class InputContactMessageContent(
|
|||||||
@SerialName(firstNameField)
|
@SerialName(firstNameField)
|
||||||
override val firstName: String,
|
override val firstName: String,
|
||||||
@SerialName(lastNameField)
|
@SerialName(lastNameField)
|
||||||
@Optional
|
|
||||||
override val lastName: String? = null,
|
override val lastName: String? = null,
|
||||||
@SerialName(vcardField)
|
@SerialName(vcardField)
|
||||||
@Optional
|
|
||||||
override val vcard: String? = null
|
override val vcard: String? = null
|
||||||
) : CommonContactData, InputMessageContent
|
) : CommonContactData, InputMessageContent
|
@ -4,7 +4,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Livable
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InputLocationMessageContent(
|
data class InputLocationMessageContent(
|
||||||
@ -13,6 +14,5 @@ data class InputLocationMessageContent(
|
|||||||
@SerialName(longitudeField)
|
@SerialName(longitudeField)
|
||||||
override val longitude: Double,
|
override val longitude: Double,
|
||||||
@SerialName(livePeriodField)
|
@SerialName(livePeriodField)
|
||||||
@Optional
|
|
||||||
override val livePeriod: Int? = null
|
override val livePeriod: Int? = null
|
||||||
) : Locationed, Livable, InputMessageContent
|
) : Locationed, Livable, InputMessageContent
|
@ -7,16 +7,15 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.disableWebPagePreviewField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.disableWebPagePreviewField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.messageTextField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.messageTextField
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InputTextMessageContent(
|
data class InputTextMessageContent(
|
||||||
@SerialName(messageTextField)
|
@SerialName(messageTextField)
|
||||||
override val caption: String,
|
override val caption: String,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@SerialName(disableWebPagePreviewField)
|
@SerialName(disableWebPagePreviewField)
|
||||||
@Optional
|
|
||||||
override val disableWebPagePreview: Boolean? = null
|
override val disableWebPagePreview: Boolean? = null
|
||||||
) : Captioned, DisableWebPagePreview, InputMessageContent
|
) : Captioned, DisableWebPagePreview, InputMessageContent
|
@ -4,7 +4,8 @@ import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueDat
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InputVenueMessageContent(
|
data class InputVenueMessageContent(
|
||||||
@ -17,9 +18,7 @@ data class InputVenueMessageContent(
|
|||||||
@SerialName(addressField)
|
@SerialName(addressField)
|
||||||
override val address: String,
|
override val address: String,
|
||||||
@SerialName(foursquareIdField)
|
@SerialName(foursquareIdField)
|
||||||
@Optional
|
|
||||||
override val foursquareId: String? = null,
|
override val foursquareId: String? = null,
|
||||||
@SerialName(foursquareTypeField)
|
@SerialName(foursquareTypeField)
|
||||||
@Optional
|
|
||||||
override val foursquareType: String? = null
|
override val foursquareType: String? = null
|
||||||
) : Locationed, CommonVenueData, InputMessageContent
|
) : Locationed, CommonVenueData, InputMessageContent
|
||||||
|
@ -3,9 +3,11 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.StringDescriptor
|
||||||
|
|
||||||
@Serializer(InputMessageContent::class)
|
@Serializer(InputMessageContent::class)
|
||||||
object InputMessageContentSerializer : KSerializer<InputMessageContent> {
|
object InputMessageContentSerializer : KSerializer<InputMessageContent> {
|
||||||
|
override val descriptor: SerialDescriptor = StringDescriptor.withName(InputMessageContent::class.toString())
|
||||||
override fun serialize(encoder: Encoder, obj: InputMessageContent) {
|
override fun serialize(encoder: Encoder, obj: InputMessageContent) {
|
||||||
when (obj) {
|
when (obj) {
|
||||||
is InputContactMessageContent -> InputContactMessageContent.serializer().serialize(encoder, obj)
|
is InputContactMessageContent -> InputContactMessageContent.serializer().serialize(encoder, obj)
|
||||||
|
@ -14,7 +14,6 @@ data class RawInlineQuery(
|
|||||||
@SerialName(offsetField)
|
@SerialName(offsetField)
|
||||||
val offset: String,
|
val offset: String,
|
||||||
@SerialName(locationField)
|
@SerialName(locationField)
|
||||||
@Optional
|
|
||||||
val location: Location? = null
|
val location: Location? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -10,16 +10,11 @@ import kotlinx.serialization.*
|
|||||||
data class InputMediaAnimation(
|
data class InputMediaAnimation(
|
||||||
@Transient
|
@Transient
|
||||||
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@Transient
|
@Transient
|
||||||
override val thumb: InputFile? = null
|
override val thumb: InputFile? = null
|
||||||
|
@ -5,22 +5,17 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.mediaField
|
import com.github.insanusmokrassar.TelegramBotAPI.types.mediaField
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InputMediaAudio(
|
data class InputMediaAudio(
|
||||||
@Transient
|
|
||||||
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@Optional
|
|
||||||
override val performer: String? = null,
|
override val performer: String? = null,
|
||||||
@Optional
|
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
override val thumb: InputFile? = null
|
override val thumb: InputFile? = null
|
||||||
) : InputMedia, DuratedInputMedia, ThumbedInputMedia, TitledInputMedia, CaptionedInputMedia, Performerable {
|
) : InputMedia, DuratedInputMedia, ThumbedInputMedia, TitledInputMedia, CaptionedInputMedia, Performerable {
|
||||||
|
@ -10,10 +10,8 @@ import kotlinx.serialization.*
|
|||||||
data class InputMediaDocument(
|
data class InputMediaDocument(
|
||||||
@Transient
|
@Transient
|
||||||
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@Transient
|
@Transient
|
||||||
override val thumb: InputFile? = null
|
override val thumb: InputFile? = null
|
||||||
|
@ -11,10 +11,8 @@ import kotlinx.serialization.*
|
|||||||
data class InputMediaPhoto(
|
data class InputMediaPhoto(
|
||||||
@Transient
|
@Transient
|
||||||
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null
|
override val parseMode: ParseMode? = null
|
||||||
) : InputMedia, CaptionedInputMedia, MediaGroupMemberInputMedia {
|
) : InputMedia, CaptionedInputMedia, MediaGroupMemberInputMedia {
|
||||||
override val type: String = "photo"
|
override val type: String = "photo"
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia
|
package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.StringDescriptor
|
||||||
|
|
||||||
@Serializer(InputMedia::class)
|
@Serializer(InputMedia::class)
|
||||||
object InputMediaSerializer : KSerializer<InputMedia> {
|
object InputMediaSerializer : KSerializer<InputMedia> {
|
||||||
|
override val descriptor: SerialDescriptor = StringDescriptor.withName(InputMedia::class.toString())
|
||||||
override fun serialize(encoder: Encoder, obj: InputMedia) {
|
override fun serialize(encoder: Encoder, obj: InputMedia) {
|
||||||
when (obj) {
|
when (obj) {
|
||||||
is InputMediaVideo -> InputMediaVideo.serializer().serialize(encoder, obj)
|
is InputMediaVideo -> InputMediaVideo.serializer().serialize(encoder, obj)
|
||||||
|
@ -10,16 +10,11 @@ import kotlinx.serialization.*
|
|||||||
data class InputMediaVideo(
|
data class InputMediaVideo(
|
||||||
@Transient
|
@Transient
|
||||||
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
override val file: InputFile = throw IllegalStateException("Must be created with file"),
|
||||||
@Optional
|
|
||||||
override val caption: String? = null,
|
override val caption: String? = null,
|
||||||
@SerialName(parseModeField)
|
@SerialName(parseModeField)
|
||||||
@Optional
|
|
||||||
override val parseMode: ParseMode? = null,
|
override val parseMode: ParseMode? = null,
|
||||||
@Optional
|
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@Optional
|
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@Transient
|
@Transient
|
||||||
override val thumb: InputFile? = null
|
override val thumb: InputFile? = null
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia
|
package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.StringDescriptor
|
||||||
|
|
||||||
@Serializer(MediaGroupMemberInputMedia::class)
|
@Serializer(MediaGroupMemberInputMedia::class)
|
||||||
object MediaGroupMemberInputMediaSerializer : KSerializer<MediaGroupMemberInputMedia> {
|
object MediaGroupMemberInputMediaSerializer : KSerializer<MediaGroupMemberInputMedia> {
|
||||||
|
override val descriptor: SerialDescriptor = StringDescriptor.withName(MediaGroupMemberInputMedia::class.toString())
|
||||||
override fun serialize(encoder: Encoder, obj: MediaGroupMemberInputMedia) {
|
override fun serialize(encoder: Encoder, obj: MediaGroupMemberInputMedia) {
|
||||||
when (obj) {
|
when (obj) {
|
||||||
is InputMediaPhoto -> InputMediaPhoto.serializer().serialize(encoder, obj)
|
is InputMediaPhoto -> InputMediaPhoto.serializer().serialize(encoder, obj)
|
||||||
is InputMediaVideo -> InputMediaVideo.serializer().serialize(encoder, obj)
|
is InputMediaVideo -> InputMediaVideo.serializer().serialize(encoder, obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun deserialize(decoder: Decoder): MediaGroupMemberInputMedia {
|
||||||
|
TODO("not implemented")
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,7 +1,8 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity
|
package com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.User
|
import com.github.insanusmokrassar.TelegramBotAPI.types.User
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.KSerializer
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.internal.ArrayListSerializer
|
import kotlinx.serialization.internal.ArrayListSerializer
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -9,9 +10,7 @@ data class RawMessageEntity(
|
|||||||
val type: String,
|
val type: String,
|
||||||
val offset: Int,
|
val offset: Int,
|
||||||
val length: Int,
|
val length: Int,
|
||||||
@Optional
|
|
||||||
val url: String? = null,
|
val url: String? = null,
|
||||||
@Optional
|
|
||||||
val user: User? = null
|
val user: User? = null
|
||||||
) {
|
) {
|
||||||
fun asMessageEntity(source: String): MessageEntity {
|
fun asMessageEntity(source: String): MessageEntity {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
"Deprecated because incorrect name",
|
"Deprecated because incorrect name",
|
||||||
@ -11,13 +12,9 @@ typealias ResponseParameters<T> = Response<T>
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class Response<T : Any>(
|
data class Response<T : Any>(
|
||||||
val ok: Boolean = false,
|
val ok: Boolean = false,
|
||||||
@Optional
|
|
||||||
val description: String? = null,
|
val description: String? = null,
|
||||||
@SerialName("error_code")
|
@SerialName("error_code")
|
||||||
@Optional
|
|
||||||
val errorCode: Int? = null,
|
val errorCode: Int? = null,
|
||||||
@Optional
|
|
||||||
val result: T? = null,
|
val result: T? = null,
|
||||||
@Optional
|
|
||||||
val parameters: ResponseParametersRaw? = null
|
val parameters: ResponseParametersRaw? = null
|
||||||
)
|
)
|
||||||
|
@ -5,10 +5,8 @@ import kotlinx.serialization.*
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class ResponseParametersRaw(
|
data class ResponseParametersRaw(
|
||||||
@SerialName("migrate_to_chat_id")
|
@SerialName("migrate_to_chat_id")
|
||||||
@Optional
|
|
||||||
private val migrateToChatId: ChatId? = null,
|
private val migrateToChatId: ChatId? = null,
|
||||||
@SerialName("retry_after")
|
@SerialName("retry_after")
|
||||||
@Optional
|
|
||||||
private val retryAfter: Long? = null
|
private val retryAfter: Long? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
import kotlinx.serialization.Optional
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class User(
|
data class User(
|
||||||
val id: ChatId,
|
val id: ChatId,
|
||||||
@SerialName(isBotField)
|
@SerialName(isBotField)
|
||||||
@Optional
|
|
||||||
val isBot: Boolean = false,
|
val isBot: Boolean = false,
|
||||||
@SerialName(firstNameField)
|
@SerialName(firstNameField)
|
||||||
val firstName: String,
|
val firstName: String,
|
||||||
@SerialName(lastNameField)
|
@SerialName(lastNameField)
|
||||||
@Optional
|
|
||||||
val lastName: String? = null,
|
val lastName: String? = null,
|
||||||
@SerialName(usernameField)
|
@SerialName(usernameField)
|
||||||
@Optional
|
|
||||||
val username: Username? = null,
|
val username: Username? = null,
|
||||||
@SerialName(languageCodeField)
|
@SerialName(languageCodeField)
|
||||||
@Optional
|
|
||||||
private val languageCode: String? = null
|
private val languageCode: String? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueData
|
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueData
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Venue(
|
data class Venue(
|
||||||
@ -12,9 +13,7 @@ data class Venue(
|
|||||||
@SerialName(addressField)
|
@SerialName(addressField)
|
||||||
override val address: String,
|
override val address: String,
|
||||||
@SerialName(foursquareIdField)
|
@SerialName(foursquareIdField)
|
||||||
@Optional
|
|
||||||
override val foursquareId: String? = null,
|
override val foursquareId: String? = null,
|
||||||
@SerialName(foursquareTypeField)
|
@SerialName(foursquareTypeField)
|
||||||
@Optional
|
|
||||||
override val foursquareType: String? = null
|
override val foursquareType: String? = null
|
||||||
) : CommonVenueData
|
) : CommonVenueData
|
||||||
|
@ -9,19 +9,14 @@ data class WebhookInfo(
|
|||||||
@SerialName(pendingUpdateCountField)
|
@SerialName(pendingUpdateCountField)
|
||||||
val awaitDeliery: Int,
|
val awaitDeliery: Int,
|
||||||
@SerialName(maxAllowedConnectionsField)
|
@SerialName(maxAllowedConnectionsField)
|
||||||
@Optional
|
|
||||||
val maxConnections: Int = 40, // default count according to documentation
|
val maxConnections: Int = 40, // default count according to documentation
|
||||||
@SerialName(hasCustomCertificateField)
|
@SerialName(hasCustomCertificateField)
|
||||||
@Optional
|
|
||||||
val customCertificate: Boolean = false,
|
val customCertificate: Boolean = false,
|
||||||
@SerialName(allowedUpdatesField)
|
@SerialName(allowedUpdatesField)
|
||||||
@Optional
|
|
||||||
val allowedUpdates: List<String> = ALL_UPDATES_LIST,
|
val allowedUpdates: List<String> = ALL_UPDATES_LIST,
|
||||||
@SerialName(lastErrorDateField)
|
@SerialName(lastErrorDateField)
|
||||||
@Optional
|
|
||||||
val lastErrorDate: TelegramDate? = null,
|
val lastErrorDate: TelegramDate? = null,
|
||||||
@SerialName(lastErrorMessageField)
|
@SerialName(lastErrorMessageField)
|
||||||
@Optional
|
|
||||||
val lastErrorMessage: String? = null
|
val lastErrorMessage: String? = null
|
||||||
) {
|
) {
|
||||||
@Transient
|
@Transient
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ForceReply(
|
data class ForceReply(
|
||||||
@Optional
|
|
||||||
val selective: Boolean? = null
|
val selective: Boolean? = null
|
||||||
) : KeyboardMarkup {
|
) : KeyboardMarkup {
|
||||||
@SerialName("force_reply")
|
@SerialName("force_reply")
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class KeyboardButton(
|
data class KeyboardButton(
|
||||||
val text: String,
|
val text: String,
|
||||||
@SerialName("request_contact")
|
@SerialName("request_contact")
|
||||||
@Optional
|
|
||||||
val requestContact: Boolean? = null,
|
val requestContact: Boolean? = null,
|
||||||
@SerialName("request_location")
|
@SerialName("request_location")
|
||||||
@Optional
|
|
||||||
val requestLocation: Boolean? = null
|
val requestLocation: Boolean? = null
|
||||||
)
|
)
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
|
import kotlinx.serialization.internal.StringDescriptor
|
||||||
|
|
||||||
@Serializer(KeyboardMarkup::class)
|
@Serializer(KeyboardMarkup::class)
|
||||||
object KeyboardMarkupSerializer : KSerializer<KeyboardMarkup> {
|
object KeyboardMarkupSerializer : KSerializer<KeyboardMarkup> {
|
||||||
|
override val descriptor: SerialDescriptor = StringDescriptor.withName(KeyboardMarkup::class.toString())
|
||||||
override fun serialize(encoder: Encoder, obj: KeyboardMarkup) {
|
override fun serialize(encoder: Encoder, obj: KeyboardMarkup) {
|
||||||
when(obj) {
|
when(obj) {
|
||||||
is ForceReply -> ForceReply.serializer().serialize(encoder, obj)
|
is ForceReply -> ForceReply.serializer().serialize(encoder, obj)
|
||||||
@ -12,4 +14,8 @@ object KeyboardMarkupSerializer : KSerializer<KeyboardMarkup> {
|
|||||||
is ReplyKeyboardRemove -> ReplyKeyboardRemove.serializer().serialize(encoder, obj)
|
is ReplyKeyboardRemove -> ReplyKeyboardRemove.serializer().serialize(encoder, obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun deserialize(decoder: Decoder): KeyboardMarkup {
|
||||||
|
TODO("not implemented")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ReplyKeyboardMarkup(
|
data class ReplyKeyboardMarkup(
|
||||||
val keyboard: Matrix<KeyboardButton>,
|
val keyboard: Matrix<KeyboardButton>,
|
||||||
@SerialName("resize_keyboard")
|
@SerialName("resize_keyboard")
|
||||||
@Optional
|
|
||||||
val resizeKeyboard: Boolean? = null,
|
val resizeKeyboard: Boolean? = null,
|
||||||
@SerialName("one_time_keyboard")
|
@SerialName("one_time_keyboard")
|
||||||
@Optional
|
|
||||||
val oneTimeKeyboard: Boolean? = null,
|
val oneTimeKeyboard: Boolean? = null,
|
||||||
@Optional
|
|
||||||
val selective: Boolean? = null
|
val selective: Boolean? = null
|
||||||
) : KeyboardMarkup
|
) : KeyboardMarkup
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
package com.github.insanusmokrassar.TelegramBotAPI.types.buttons
|
||||||
|
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ReplyKeyboardRemove(
|
data class ReplyKeyboardRemove(
|
||||||
@Optional
|
|
||||||
val selective: Boolean? = null
|
val selective: Boolean? = null
|
||||||
) : KeyboardMarkup {
|
) : KeyboardMarkup {
|
||||||
@SerialName("remove_keyboard")
|
@SerialName("remove_keyboard")
|
||||||
|
@ -2,24 +2,25 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.chat
|
|||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.RawMessage
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class RawChat(
|
data class RawChat(
|
||||||
override val id: ChatId,
|
override val id: ChatId,
|
||||||
private val type: String,
|
private val type: String,
|
||||||
@Optional private val title: String? = null,
|
private val title: String? = null,
|
||||||
@Optional private val username: Username? = null,
|
private val username: Username? = null,
|
||||||
@Optional private val first_name: String? = null,
|
private val first_name: String? = null,
|
||||||
@Optional private val last_name: String? = null,
|
private val last_name: String? = null,
|
||||||
@Optional private val all_members_are_administrators: Boolean? = null,
|
private val all_members_are_administrators: Boolean? = null,
|
||||||
@Optional private val description: String? = null,
|
private val description: String? = null,
|
||||||
@Optional private val invite_link: String? = null,
|
private val invite_link: String? = null,
|
||||||
@Optional private val pinned_message: RawMessage? = null,
|
private val pinned_message: RawMessage? = null,
|
||||||
@Optional private val sticker_set_name: String? = null,
|
private val sticker_set_name: String? = null,
|
||||||
@Optional private val can_set_sticker_set: Boolean? = null,
|
private val can_set_sticker_set: Boolean? = null,
|
||||||
@SerialName("photo")
|
@SerialName("photo")
|
||||||
@Optional override val chatPhoto: ChatPhoto? = null
|
override val chatPhoto: ChatPhoto? = null
|
||||||
) : Chat {
|
) : Chat {
|
||||||
fun extractChat(): Chat {
|
fun extractChat(): Chat {
|
||||||
return when (type) {
|
return when (type) {
|
||||||
|
@ -2,7 +2,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.types.files
|
|||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.*
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class AnimationFile(
|
data class AnimationFile(
|
||||||
@ -10,17 +11,12 @@ data class AnimationFile(
|
|||||||
override val fileId: FileId,
|
override val fileId: FileId,
|
||||||
override val width: Int,
|
override val width: Int,
|
||||||
override val height: Int,
|
override val height: Int,
|
||||||
@Optional
|
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@Optional
|
|
||||||
override val thumb: PhotoSize? = null,
|
override val thumb: PhotoSize? = null,
|
||||||
@SerialName(fileNameField)
|
@SerialName(fileNameField)
|
||||||
@Optional
|
|
||||||
override val fileName: String? = null,
|
override val fileName: String? = null,
|
||||||
@SerialName(mimeTypeField)
|
@SerialName(mimeTypeField)
|
||||||
@Optional
|
|
||||||
override val mimeType: String? = null,
|
override val mimeType: String? = null,
|
||||||
@SerialName(fileSizeField)
|
@SerialName(fileSizeField)
|
||||||
@Optional
|
|
||||||
override val fileSize: Long? = null
|
override val fileSize: Long? = null
|
||||||
) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, CustomNamedMediaFile, SizedMediaFile
|
) : TelegramMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, CustomNamedMediaFile, SizedMediaFile
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user