mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-02 22:59:48 +00:00
rewrite GetWebhookInfo as class for better work with serialization
This commit is contained in:
@@ -2,12 +2,11 @@ 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()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user