mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-27 02:57:13 +00:00
current raw tools are internal
This commit is contained in:
parent
41c5ba7309
commit
402e1b12dc
@ -10,27 +10,6 @@ import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.internal.ArrayListSerializer
|
||||
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_MESSAGE", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_MESSAGE"))
|
||||
const val UPDATE_MESSAGE = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_MESSAGE
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_EDITED_MESSAGE", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_EDITED_MESSAGE"))
|
||||
const val UPDATE_EDITED_MESSAGE = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_EDITED_MESSAGE
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_CHANNEL_POST", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_CHANNEL_POST"))
|
||||
const val UPDATE_CHANNEL_POST = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_CHANNEL_POST
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_EDITED_CHANNEL_POST", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_EDITED_CHANNEL_POST"))
|
||||
const val UPDATE_EDITED_CHANNEL_POST = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_EDITED_CHANNEL_POST
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_CHOSEN_INLINE_RESULT", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_CHOSEN_INLINE_RESULT"))
|
||||
const val UPDATE_CHOSEN_INLINE_RESULT = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_CHOSEN_INLINE_RESULT
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_INLINE_QUERY", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_INLINE_QUERY"))
|
||||
const val UPDATE_INLINE_QUERY = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_INLINE_QUERY
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_CALLBACK_QUERY", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_CALLBACK_QUERY"))
|
||||
const val UPDATE_CALLBACK_QUERY = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_CALLBACK_QUERY
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_SHIPPING_QUERY", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_SHIPPING_QUERY"))
|
||||
const val UPDATE_SHIPPING_QUERY = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_SHIPPING_QUERY
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_PRE_CHECKOUT_QUERY", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_PRE_CHECKOUT_QUERY"))
|
||||
const val UPDATE_PRE_CHECKOUT_QUERY = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_PRE_CHECKOUT_QUERY
|
||||
@Deprecated("Replaced to other package", ReplaceWith("UPDATE_POLL", "com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_POLL"))
|
||||
const val UPDATE_POLL = com.github.insanusmokrassar.TelegramBotAPI.types.UPDATE_POLL
|
||||
|
||||
@Serializable
|
||||
data class GetUpdates(
|
||||
val offset: UpdateIdentifier? = null,// set `last update id + 1` to receive next part of updates
|
||||
|
@ -13,7 +13,7 @@ interface Message {
|
||||
val date: DateTime
|
||||
}
|
||||
|
||||
object TelegramBotAPIMessageDeserializationStrategy : DeserializationStrategy<Message> {
|
||||
internal object TelegramBotAPIMessageDeserializationStrategy : DeserializationStrategy<Message> {
|
||||
override val descriptor: SerialDescriptor = StringDescriptor.withName("TelegramBotAPIMessageSerializer")
|
||||
|
||||
override fun patch(decoder: Decoder, old: Message): Message = throw UpdateNotSupportedException(descriptor.name)
|
||||
@ -22,7 +22,7 @@ object TelegramBotAPIMessageDeserializationStrategy : DeserializationStrategy<Me
|
||||
}
|
||||
}
|
||||
|
||||
object TelegramBotAPIMessageDeserializeOnlySerializer : KSerializer<Message> {
|
||||
internal object TelegramBotAPIMessageDeserializeOnlySerializer : KSerializer<Message> {
|
||||
override val descriptor: SerialDescriptor
|
||||
get() = TelegramBotAPIMessageDeserializationStrategy.descriptor
|
||||
|
||||
|
@ -10,7 +10,7 @@ interface Update {
|
||||
val data: Any
|
||||
}
|
||||
|
||||
object UpdateSerializerWithoutDeserialization : KSerializer<Update> {
|
||||
internal object UpdateSerializerWithoutDeserialization : KSerializer<Update> {
|
||||
override val descriptor: SerialDescriptor = StringDescriptor.withName("UpdateSerializerWithoutDeserialization")
|
||||
|
||||
override fun deserialize(decoder: Decoder): Update = UpdateDeserializationStrategy.deserialize(decoder)
|
||||
@ -18,7 +18,7 @@ object UpdateSerializerWithoutDeserialization : KSerializer<Update> {
|
||||
override fun serialize(encoder: Encoder, obj: Update) = throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
object UpdateDeserializationStrategy : DeserializationStrategy<Update> {
|
||||
internal object UpdateDeserializationStrategy : DeserializationStrategy<Update> {
|
||||
override val descriptor: SerialDescriptor = StringDescriptor.withName("UpdateDeserializationStrategy")
|
||||
|
||||
override fun patch(decoder: Decoder, old: Update): Update = throw UpdateNotSupportedException(descriptor.name)
|
||||
|
Loading…
Reference in New Issue
Block a user