mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-23 02:28:45 +00:00
third part of deprecations removing
This commit is contained in:
parent
ed60dc49e7
commit
e296c2ee00
@ -21,6 +21,14 @@
|
|||||||
* `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.makeFileUrl`
|
* `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.makeFileUrl`
|
||||||
* `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.downloadingFilesBaseUrl`
|
* `com.github.insanusmokrassar.TelegramBotAPI.types.files.PathedFileKt.downloadingFilesBaseUrl`
|
||||||
* `com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.Data`
|
* `com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.Data`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByInlineMessageId`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ByMessageId`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.bot.RequestException`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.ReplyMessageNotFound`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#baseUrl`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor#constructor(token, hostUrl)`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, client, hostUrl, callsFactories, excludeDefaultFactories, requestsLimiter, jsonFormatter)`
|
||||||
|
* `com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, engine, hostUrl)`
|
||||||
|
|
||||||
## 0.18.0 Raws cleaning
|
## 0.18.0 Raws cleaning
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
|
||||||
|
|
||||||
@Deprecated(
|
|
||||||
"Deprecated for the reason of creating of more obvious type interface",
|
|
||||||
ReplaceWith("InlineMessageAction", "com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.InlineMessageAction")
|
|
||||||
)
|
|
||||||
typealias ByInlineMessageId = InlineMessageAction
|
|
@ -1,8 +0,0 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
|
|
||||||
|
|
||||||
@Deprecated(
|
|
||||||
"Deprecated for the reason of creating of more obvious type interface",
|
|
||||||
ReplaceWith("MessageAction", "com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.MessageAction")
|
|
||||||
|
|
||||||
)
|
|
||||||
typealias ByMessageId = MessageAction
|
|
@ -4,14 +4,4 @@ import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
|
|||||||
|
|
||||||
abstract class BaseRequestsExecutor(
|
abstract class BaseRequestsExecutor(
|
||||||
protected val telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper
|
protected val telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper
|
||||||
) : RequestsExecutor {
|
) : RequestsExecutor
|
||||||
@Deprecated("Deprecated due to new TelegramAPIUrlKeeper API", ReplaceWith("telegramAPIUrlsKeeper.commonAPIUrl"))
|
|
||||||
protected val baseUrl: String
|
|
||||||
get() = telegramAPIUrlsKeeper.commonAPIUrl
|
|
||||||
|
|
||||||
@Deprecated("Deprecated due to new TelegramAPIUrlKeeper API")
|
|
||||||
constructor(
|
|
||||||
token: String,
|
|
||||||
hostUrl: String = "https://api.telegram.org"
|
|
||||||
) : this (TelegramAPIUrlsKeeper(token, hostUrl))
|
|
||||||
}
|
|
||||||
|
@ -25,28 +25,6 @@ class KtorRequestsExecutor(
|
|||||||
private val requestsLimiter: RequestLimiter = EmptyLimiter,
|
private val requestsLimiter: RequestLimiter = EmptyLimiter,
|
||||||
private val jsonFormatter: Json = Json.nonstrict
|
private val jsonFormatter: Json = Json.nonstrict
|
||||||
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
||||||
|
|
||||||
@Deprecated("Deprecated due to new TelegramAPIUrlKeeper API")
|
|
||||||
constructor(
|
|
||||||
token: String,
|
|
||||||
client: HttpClient = HttpClient(),
|
|
||||||
hostUrl: String = "https://api.telegram.org",
|
|
||||||
callsFactories: List<KtorCallFactory> = emptyList(),
|
|
||||||
excludeDefaultFactories: Boolean = false,
|
|
||||||
requestsLimiter: RequestLimiter = EmptyLimiter,
|
|
||||||
jsonFormatter: Json = Json.nonstrict
|
|
||||||
) : this(TelegramAPIUrlsKeeper(token, hostUrl), client, callsFactories, excludeDefaultFactories, requestsLimiter, jsonFormatter)
|
|
||||||
|
|
||||||
@Deprecated("Deprecated due to new TelegramAPIUrlKeeper API")
|
|
||||||
constructor(
|
|
||||||
token: String,
|
|
||||||
engine: HttpClientEngine? = null,
|
|
||||||
hostUrl: String = "https://api.telegram.org"
|
|
||||||
) : this(
|
|
||||||
TelegramAPIUrlsKeeper(token, hostUrl),
|
|
||||||
engine ?.let { HttpClient(engine) } ?: HttpClient()
|
|
||||||
)
|
|
||||||
|
|
||||||
private val callsFactories: List<KtorCallFactory> = callsFactories.run {
|
private val callsFactories: List<KtorCallFactory> = callsFactories.run {
|
||||||
if (!excludeDefaultFactories) {
|
if (!excludeDefaultFactories) {
|
||||||
asSequence().plus(SimpleRequestCallFactory()).plus(MultipartRequestCallFactory()).toList()
|
asSequence().plus(SimpleRequestCallFactory()).plus(MultipartRequestCallFactory()).toList()
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.bot
|
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException
|
|
||||||
|
|
||||||
@Deprecated(
|
|
||||||
"Replaced to another package",
|
|
||||||
ReplaceWith(
|
|
||||||
"RequestException",
|
|
||||||
"com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
typealias RequestException = RequestException
|
|
@ -32,9 +32,3 @@ class UnauthorizedException(response: Response, plainAnswer: String, message: St
|
|||||||
|
|
||||||
class ReplyMessageNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
class ReplyMessageNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||||
RequestException(response, plainAnswer, message, cause)
|
RequestException(response, plainAnswer, message, cause)
|
||||||
|
|
||||||
@Deprecated(
|
|
||||||
"Replaced by ReplyMessageNotFoundException",
|
|
||||||
ReplaceWith("ReplyMessageNotFoundException", "com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.ReplyMessageNotFoundException")
|
|
||||||
)
|
|
||||||
typealias ReplyMessageNotFound = ReplyMessageNotFoundException
|
|
Loading…
Reference in New Issue
Block a user