1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 00:03:48 +00:00

rewrite GetWebhookInfo as class for better work with serialization

This commit is contained in:
InsanusMokrassar 2019-02-27 14:12:39 +08:00
parent f3ba288ad8
commit ce9e141680

View File

@ -2,12 +2,11 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.webhook
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.WebhookInfo
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import kotlinx.serialization.*
@Serializable
object GetWebhookInfo : SimpleRequest<WebhookInfo> {
class GetWebhookInfo : SimpleRequest<WebhookInfo> {
override fun method(): String = "getWebhookInfo"
override fun resultSerializer(): KSerializer<WebhookInfo> = WebhookInfo.serializer()
}
}