mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +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
|
* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in
|
||||||
`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package
|
`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 com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.useWith
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
|
||||||
data class ProxySettings(
|
@Deprecated(
|
||||||
val host: String = "localhost",
|
"Replaced in settings package",
|
||||||
val port: Int = 1080,
|
ReplaceWith("ProxySettings", "com.github.insanusmokrassar.TelegramBotAPI.bot.settings.ProxySettings")
|
||||||
val username: String? = null,
|
|
||||||
val password: String? = null
|
|
||||||
)
|
)
|
||||||
|
typealias ProxySettings = com.github.insanusmokrassar.TelegramBotAPI.bot.settings.ProxySettings
|
||||||
|
|
||||||
|
|
||||||
@Deprecated(
|
@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