mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-14 04:13:47 +00:00
InputMessageContent filling
This commit is contained in:
parent
6bdd17a186
commit
ce34ca6f95
10
CHANGELOG.md
10
CHANGELOG.md
@ -79,3 +79,13 @@ must be regular text
|
||||
* Update `MediaGroupMessage` interface
|
||||
* Add implementation of `MediaGroupMessage`
|
||||
* Add generating of `MediaGroupMessage` in `RawMessage`
|
||||
|
||||
#### Inline mode changes
|
||||
|
||||
// It is temporal block of changes which will be replaced before complete merge
|
||||
|
||||
* Most part of abstractions was replaced from `requests` and `types` on more high level
|
||||
* Added abstraction `CommonVenueData`
|
||||
* Added abstraction `CommonContactData`
|
||||
* Added `InputMessageContent`
|
||||
* Update some types and requests according to abstractions replacing
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.abstracts
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
|
||||
|
||||
interface CommonContactData {
|
||||
val phoneNumber: String
|
||||
val firstName: String
|
||||
val lastName: String?
|
||||
val vcard: String? // TODO:: Replace by some vCard abstraction
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
|
||||
|
||||
interface CommonVenueData {
|
||||
val title: String
|
||||
val address: String
|
||||
val foursquareId: String?
|
||||
val foursquareType: String? // TODO:: Rewrite with enum or interface
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
|
||||
|
||||
interface Livable {
|
||||
/**
|
||||
* Period in SECONDS
|
||||
*/
|
||||
val livePeriod: Int?
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.abstracts
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
|
||||
|
||||
interface Locationed {
|
||||
val latitude: Double
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
|
@ -0,0 +1,5 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
interface DisableNotification {
|
||||
val disableNotification: Boolean
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
interface DisableWebPagePreview {
|
||||
val disableWebPagePreview: Boolean?
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.TelegramDate
|
||||
|
@ -1,5 +0,0 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types
|
||||
|
||||
interface DisableNotification {
|
||||
val disableNotification: Boolean
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
|
||||
interface ChatMemberRequest<T: Any> : ChatRequest, SimpleRequest<T> {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.RawChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.RawChatMember
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.DisableNotification
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableNotification
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.internal.BooleanSerializer
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.internal.BooleanSerializer
|
||||
|
@ -2,7 +2,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.internal.BooleanSerializer
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.internal.BooleanSerializer
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.internal.BooleanSerializer
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
interface EditReplyMessage : ReplyMarkup {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ByMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.GetGameHighScores
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.SerialName
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ByInlineMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.GetGameHighScores
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.SerialName
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ByMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.SetGameScore
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ByInlineMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts.SetGameScore
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import kotlinx.serialization.*
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.DisableWebPagePreview
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableWebPagePreview
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
|
@ -1,5 +1,5 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
|
||||
|
||||
interface ReplyingMarkupSendMessageRequest<T: Any>: SendMessageRequest<T>, ReplyMarkup
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
|
||||
interface SendChatMessageRequest<T: Any> : SimpleRequest<T>, ChatRequest
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.DisableNotification
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ReplyMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableNotification
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMessageId
|
||||
|
||||
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.ReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.payments
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
@ -1,5 +1,5 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.types.UntilDate
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.UntilDate
|
||||
|
||||
interface BannedChatMember : ChatMember, UntilDate
|
@ -58,6 +58,7 @@ const val foursquareIdField = "foursquare_id"
|
||||
const val foursquareTypeField = "foursquare_type"
|
||||
const val untilDateField = "until_date"
|
||||
const val errorMessageField = "error_message"
|
||||
const val messageTextField = "message_text"
|
||||
|
||||
const val photoUrlField = "photo_url"
|
||||
const val photoSizeField = "photo_size"
|
||||
|
@ -1,19 +1,20 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonContactData
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class Contact(
|
||||
@SerialName(phoneNumberField)
|
||||
val phoneNumber: String,
|
||||
override val phoneNumber: String,
|
||||
@SerialName(firstNameField)
|
||||
val firstName: String,
|
||||
override val firstName: String,
|
||||
@SerialName(lastNameField)
|
||||
@Optional
|
||||
val lastName: String? = null,
|
||||
override val lastName: String? = null,
|
||||
@SerialName(userIdField)
|
||||
@Optional
|
||||
val userId: UserId? = null,
|
||||
@Optional
|
||||
val vcard: String? = null
|
||||
)
|
||||
override val vcard: String? = null
|
||||
) : CommonContactData
|
||||
|
@ -1,5 +1,5 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.abstracts.Captioned
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Captioned
|
||||
|
||||
interface CaptionedInlineQueryResult : InlineQueryResult, Captioned
|
||||
|
@ -1,5 +1,5 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.abstracts.Locationed
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
||||
|
||||
interface PositionedInlineQueryResult : InlineQueryResult, Locationed
|
@ -0,0 +1,19 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonContactData
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class InputContactMessageContent(
|
||||
@SerialName(phoneNumberField)
|
||||
override val phoneNumber: String,
|
||||
@SerialName(firstNameField)
|
||||
override val firstName: String,
|
||||
@SerialName(lastNameField)
|
||||
@Optional
|
||||
override val lastName: String? = null,
|
||||
@Optional
|
||||
override val vcard: String? = null
|
||||
) : CommonContactData, InputMessageContent
|
@ -0,0 +1,18 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Livable
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class InputLocationMessageContent(
|
||||
@SerialName(latitudeField)
|
||||
override val latitude: Double,
|
||||
@SerialName(longitudeField)
|
||||
override val longitude: Double,
|
||||
@SerialName(livePeriodField)
|
||||
@Optional
|
||||
override val livePeriod: Int? = null
|
||||
) : Locationed, Livable, InputMessageContent
|
@ -0,0 +1,21 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableWebPagePreview
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Captioned
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.disableWebPagePreviewField
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.messageTextField
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class InputTextMessageContent(
|
||||
@SerialName(messageTextField)
|
||||
override val caption: String,
|
||||
@SerialName(parseModeField)
|
||||
override val parseMode: ParseMode,
|
||||
@SerialName(disableWebPagePreviewField)
|
||||
@Optional
|
||||
override val disableWebPagePreview: Boolean? = null
|
||||
) : Captioned, DisableWebPagePreview, InputMessageContent
|
@ -0,0 +1,24 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InputMessageContent
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class InputVenueMessageContent(
|
||||
@SerialName(latitudeField)
|
||||
override val latitude: Double,
|
||||
@SerialName(longitudeField)
|
||||
override val longitude: Double,
|
||||
@SerialName(titleField)
|
||||
override val title: String,
|
||||
@SerialName(addressField)
|
||||
override val address: String,
|
||||
@SerialName(foursquareIdField)
|
||||
@Optional
|
||||
override val foursquareId: String? = null,
|
||||
@SerialName(foursquareTypeField)
|
||||
@Optional
|
||||
override val foursquareType: String? = null
|
||||
) : Locationed, CommonVenueData, InputMessageContent
|
@ -1,4 +1,3 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts
|
||||
|
||||
interface InputMessageContent {
|
||||
}
|
||||
interface InputMessageContent
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.abstracts.Locationed
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.types
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CommonVenueData
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
@ -7,13 +8,13 @@ data class Venue(
|
||||
@SerialName(locationField)
|
||||
val location: Location,
|
||||
@SerialName(titleField)
|
||||
val title: String,
|
||||
override val title: String,
|
||||
@SerialName(addressField)
|
||||
val address: String,
|
||||
override val address: String,
|
||||
@SerialName(foursquareIdField)
|
||||
@Optional
|
||||
val foursquareId: String? = null,
|
||||
override val foursquareId: String? = null,
|
||||
@SerialName(foursquareTypeField)
|
||||
@Optional
|
||||
val foursquareType: String? = null // TODO:: Rewrite with enum or interface
|
||||
)
|
||||
override val foursquareType: String? = null
|
||||
) : CommonVenueData
|
||||
|
Loading…
Reference in New Issue
Block a user