mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-10-25 14:07:28 +00:00
RawChat boilerplate was removed and replaced by serializers
This commit is contained in:
1 parent
d6bb14e342
commit
1f62c8cf98
17 files changed
+168
-138
No files matched your search
+4
-3
@@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.RawChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ExtendedChatSerializer
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended.ExtendedChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@@ -11,7 +12,7 @@ import kotlinx.serialization.*
|
||||
data class GetChat(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier
|
||||
): ChatRequest, SimpleRequest<RawChat> {
|
||||
): ChatRequest, SimpleRequest<ExtendedChat> {
|
||||
override fun method(): String = "getChat"
|
||||
override fun resultSerializer(): KSerializer<RawChat> = RawChat.serializer()
|
||||
override fun resultSerializer(): KSerializer<ExtendedChat> = ExtendedChatSerializer
|
||||
}
|
||||
Reference in new issue
Block a user