mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-21 15:53:47 +00:00
replace ProxySettings
This commit is contained in:
parent
82420165d0
commit
58684ee57e
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
)
|
Loading…
Reference in New Issue
Block a user