1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-26 03:28:10 +00:00

add companions for SimpleRequestCallFactory and MultipartRequestCallFactory

This commit is contained in:
InsanusMokrassar 2021-08-08 17:44:20 +06:00
parent 7d35114b5d
commit 1d37a7446c
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.bot.Ktor.base
import dev.inmo.tgbotapi.bot.Ktor.KtorCallFactory
import dev.inmo.tgbotapi.requests.abstracts.*
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
import dev.inmo.tgbotapi.utils.mapWithCommonValues
@ -35,4 +36,7 @@ class MultipartRequestCallFactory : AbstractRequestCallFactory() {
}
)
}
@Deprecated("Use class MultipartRequestCallFactory() constructor call instead of just MultipartRequestCallFactory")
companion object : KtorCallFactory by MultipartRequestCallFactory()
}

View File

@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.bot.Ktor.base
import dev.inmo.tgbotapi.bot.Ktor.KtorCallFactory
import dev.inmo.tgbotapi.requests.abstracts.*
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
import io.ktor.client.HttpClient
@ -19,4 +20,7 @@ class SimpleRequestCallFactory : AbstractRequestCallFactory() {
ContentType.Application.Json
)
}
@Deprecated("Use class SimpleRequestCallFactory() constructor call instead of just SimpleRequestCallFactory")
companion object : KtorCallFactory by SimpleRequestCallFactory()
}