From ce9e141680b2319a4c2a34ed8a2134d9a88dbf27 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 27 Feb 2019 14:12:39 +0800 Subject: [PATCH] rewrite GetWebhookInfo as class for better work with serialization --- .../TelegramBotAPI/requests/webhook/GetWebhookInfo.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt index 92d4c72462..8b4decd01b 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/GetWebhookInfo.kt @@ -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 { +class GetWebhookInfo : SimpleRequest { override fun method(): String = "getWebhookInfo" override fun resultSerializer(): KSerializer = WebhookInfo.serializer() -} \ No newline at end of file +}