From 57bf40a4f9408a3966ee1c0918105f59ada637e6 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 13 Apr 2019 16:02:24 +0800 Subject: [PATCH] DeleteWebhook request --- CHANGELOG.md | 1 + .../requests/webhook/DeleteWebhook.kt | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index a1f6158001..101e934954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ of `]` in links titles * `kotlin coroutines` version `1.1.1` -> `1.2.0` * `kotlin serialization` version `0.10.0` -> `0.11.0` * `ktor` version `1.1.2` -> `1.1.3` +* Added `DeleteWebhook` request ## 0.11.0 diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt new file mode 100644 index 0000000000..2260816fe1 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/DeleteWebhook.kt @@ -0,0 +1,13 @@ +package com.github.insanusmokrassar.TelegramBotAPI.requests.webhook + +import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest +import kotlinx.serialization.KSerializer +import kotlinx.serialization.Serializable +import kotlinx.serialization.internal.BooleanSerializer + +@Serializable +class DeleteWebhook : SimpleRequest { + override fun method(): String = "deleteWebhook" + + override fun resultSerializer(): KSerializer = BooleanSerializer +}