add companions for SimpleRequestCallFactory and MultipartRequestCallFactory

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

No files matched your search

@@ -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()
}
@@ -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()
}