1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-09-28 13:36:08 +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,11 +2,10 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.webhook
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.WebhookInfo import com.github.insanusmokrassar.TelegramBotAPI.types.WebhookInfo
import kotlinx.serialization.KSerializer import kotlinx.serialization.*
import kotlinx.serialization.Serializable
@Serializable @Serializable
object GetWebhookInfo : SimpleRequest<WebhookInfo> { class GetWebhookInfo : SimpleRequest<WebhookInfo> {
override fun method(): String = "getWebhookInfo" override fun method(): String = "getWebhookInfo"
override fun resultSerializer(): KSerializer<WebhookInfo> = WebhookInfo.serializer() override fun resultSerializer(): KSerializer<WebhookInfo> = WebhookInfo.serializer()