2018-12-26 08:07:24 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.requests
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
2019-02-27 06:01:04 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.ALL_UPDATES_LIST
2019-03-15 08:12:17 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.UpdateIdentifier
2018-12-26 08:07:24 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.update.RawUpdate
2019-04-13 02:21:19 +00:00
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
2018-12-26 08:07:24 +00:00
import kotlinx.serialization.internal.ArrayListSerializer
2019-02-27 06:01:04 +00:00
@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
2019-05-10 05:14:50 +00:00
@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
2018-12-26 08:07:24 +00:00
@Serializable
data class GetUpdates (
val offset : UpdateIdentifier ? = null , // set `last update id + 1` to receive next part of updates
val limit : Int ? = null ,
val timeout : Int ? = null ,
2019-02-27 06:01:04 +00:00
val allowed _updates : List < String > ? = ALL _UPDATES _LIST
2018-12-26 08:07:24 +00:00
) : SimpleRequest < List < RawUpdate > > {
override fun method ( ) : String = " getUpdates "
2019-08-17 05:50:46 +00:00
override fun resultDeserializer ( ) : KSerializer < List < RawUpdate > > = ArrayListSerializer ( RawUpdate . serializer ( ) )
2018-12-26 08:07:24 +00:00
}