1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-21 15:53:47 +00:00

replace ProxySettings

This commit is contained in:
InsanusMokrassar 2019-01-24 09:00:29 +08:00
parent 82420165d0
commit 58684ee57e
3 changed files with 21 additions and 5 deletions

View File

@ -47,3 +47,4 @@
* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in
`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package
* Replace `ProxySettings` data class in `settings` package, deprecate old link

View File

@ -3,12 +3,11 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot
import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.useWith
import okhttp3.OkHttpClient
data class ProxySettings(
val host: String = "localhost",
val port: Int = 1080,
val username: String? = null,
val password: String? = null
@Deprecated(
"Replaced in settings package",
ReplaceWith("ProxySettings", "com.github.insanusmokrassar.TelegramBotAPI.bot.settings.ProxySettings")
)
typealias ProxySettings = com.github.insanusmokrassar.TelegramBotAPI.bot.settings.ProxySettings
@Deprecated(

View File

@ -0,0 +1,16 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.settings
import kotlinx.serialization.Optional
import kotlinx.serialization.Serializable
@Serializable
data class ProxySettings(
@Optional
val host: String = "localhost",
@Optional
val port: Int = 1080,
@Optional
val username: String? = null,
@Optional
val password: String? = null
)