diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a1edb6593..9d436f0bd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,15 @@ * `com.github.insanusmokrassar.TelegramBotAPI.utils.createMarkdownText` * `com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownCaption` * `com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownText` + * `com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.KtorUpdatesPoller` + * `com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.CaptionedMediaContent` + * `com.github.insanusmokrassar.TelegramBotAPI.types.message.CommonForwardedMessage` + * `com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.CaptionedInputMedia` + * `com.github.insanusmokrassar.TelegramBotAPI.types.games.Game#text` + * `com.github.insanusmokrassar.TelegramBotAPI.types.games.Game#textEntities` + * `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.makeFileUrl` + * `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.downloadingFilesBaseUrl` + * `com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.Data` ## 0.18.0 Raws cleaning diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Data.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Data.kt deleted file mode 100644 index d8ff64cd37..0000000000 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/send/media/base/Data.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base - -@Deprecated( - "Renamed to DataRequest", - ReplaceWith( - "DataRequest", - "com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.DataRequest" - ) -) -typealias Data = DataRequest diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/CaptionedInputMedia.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/CaptionedInputMedia.kt deleted file mode 100644 index 3d909db385..0000000000 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InputMedia/CaptionedInputMedia.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia - -import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput - -@Deprecated( - "Deprecated due to replace by common type CaptionedOutput", - ReplaceWith("CaptionedOutput", "com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedOutput") -) -typealias CaptionedInputMedia = CaptionedOutput \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt index 7ab0ab5a11..6b85ec49ed 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/files/PathedFile.kt @@ -18,15 +18,3 @@ data class PathedFile( fun TelegramAPIUrlsKeeper.resolveFileURL(file: PathedFile): String = "$fileBaseUrl/${file.filePath}" inline fun PathedFile.fullUrl(keeper: TelegramAPIUrlsKeeper): String = keeper.resolveFileURL(this) - -@Deprecated("Deprecated due to old API", ReplaceWith("fullUrl(telegramApiUrlsKeeper)")) -fun PathedFile.makeFileUrl( - botToken: String, - apiHost: String = "https://api.telegram.org" -) = "${downloadingFilesBaseUrl(botToken, apiHost)}/$filePath" - -@Deprecated("Deprecated due to old API", ReplaceWith("telegramApiUrlsKeeper.fileBaseUrl")) -fun downloadingFilesBaseUrl( - botToken: String, - apiHost: String -) = "$apiHost/file/bot$botToken" diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt index 015363eb06..f0444082ad 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/games/Game.kt @@ -14,20 +14,4 @@ data class Game( override val caption: String? = null, override val captionEntities: List = emptyList(), val animation: AnimationFile? = null -) : Titled, CaptionedInput { - @Deprecated( - "Missinterfaced field", - ReplaceWith("caption") - ) - @Transient - val text: String? - get() = caption - - @Deprecated( - "Missinterfaced field", - ReplaceWith("captionEntities") - ) - @Transient - val textEntities: List? - get() = captionEntities -} +) : Titled, CaptionedInput diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt index dc970597bc..7d6b370c41 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/ForwardedMessage.kt @@ -17,12 +17,6 @@ data class UserForwardedMessage( val from: User ) : ForwardedMessage() -@Deprecated( - "Renamed according to correct meaning", - ReplaceWith("UserForwardedMessage", "com.github.insanusmokrassar.TelegramBotAPI.types.message.UserForwardedMessage") -) -typealias CommonForwardedMessage = UserForwardedMessage - data class ForwardedFromChannelMessage( override val dateOfOriginal: TelegramDate, val messageId: MessageIdentifier, diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/CaptionedMediaContent.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/CaptionedMediaContent.kt deleted file mode 100644 index 340813e617..0000000000 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/message/content/abstracts/CaptionedMediaContent.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts - -import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedInput - -@Deprecated( - "Deprecated due to replace by common type CaptionedInput", - ReplaceWith("CaptionedInput", "com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedInput") -) -typealias CaptionedMediaContent = CaptionedInput \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt index 941773383d..bed3424af0 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/KtorUpdatesPoller.kt @@ -50,25 +50,6 @@ fun KtorUpdatesPoller( ) } -@Deprecated("Deprecated due to new TelegramAPIUrlsKeeper") -fun KtorUpdatesPoller( - token: String, - timeoutSeconds: Int? = null, - oneTimeUpdatesLimit: Int? = null, - allowedUpdates: List = ALL_UPDATES_LIST, - exceptionsHandler: (Exception) -> Boolean = { true }, - updatesReceiver: UpdateReceiver -): KtorUpdatesPoller { - return KtorUpdatesPoller( - TelegramAPIUrlsKeeper(token), - timeoutSeconds, - oneTimeUpdatesLimit, - allowedUpdates, - exceptionsHandler, - updatesReceiver - ) -} - class KtorUpdatesPoller( private val executor: RequestsExecutor, private val timeoutSeconds: Int? = null,