mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
rewrite GetWebhookInfo as class for better work with serialization
This commit is contained in:
parent
f3ba288ad8
commit
ce9e141680
@ -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()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user