tgbotapi/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/games/abstracts/GetGameHighScores.kt

19 lines
843 B
Kotlin
Raw Normal View History

2018-12-26 08:07:24 +00:00
package com.github.insanusmokrassar.TelegramBotAPI.requests.games.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
import com.github.insanusmokrassar.TelegramBotAPI.types.games.GameHighScore
2019-12-02 08:35:37 +00:00
import kotlinx.serialization.DeserializationStrategy
2018-12-26 08:07:24 +00:00
import kotlinx.serialization.KSerializer
import kotlinx.serialization.internal.ArrayListSerializer
interface GetGameHighScores : SimpleRequest<List<GameHighScore>> {
val userId: UserId
override fun method(): String = "getGameHighScores"
2019-12-02 08:35:37 +00:00
override val resultDeserializer: DeserializationStrategy<List<GameHighScore>>
get() = GameHighScoresSerializer
2018-12-26 08:07:24 +00:00
}
object GameHighScoresSerializer : KSerializer<List<GameHighScore>> by ArrayListSerializer(GameHighScore.serializer())