Skip to content

//core/com.petersamokhin.vksdk.core.model/VkSettings

VkSettings

[common]\ data class VkSettings@JvmOverloads()constructor(httpClient: HttpClient, apiVersion: String, defaultParams: Parameters, maxExecuteRequestsPerSecond: Int, backgroundDispatcher: CoroutineDispatcher, json: Json)

Settings

Author

Peter Samokhin, https://petersamokhin.com

Constructors

VkSettings [common]
fun VkSettings(httpClient: HttpClient, apiVersion: Double, defaultParams: Parameters = Parameters(), maxExecuteRequestsPerSecond: Int = 3, backgroundDispatcher: CoroutineDispatcher = Dispatchers.Default, json: Json = defaultJson())
Another constructor for using Double API version.
VkSettings [common]
@JvmOverloads()
fun VkSettings(httpClient: HttpClient, apiVersion: String = VkApi.DEFAULT_VERSION, defaultParams: Parameters = Parameters(), maxExecuteRequestsPerSecond: Int = 3, backgroundDispatcher: CoroutineDispatcher = Dispatchers.Default, json: Json = defaultJson())

Properties

Name Summary
apiVersion [common]
val apiVersion: String
VK API version, https://vk.
backgroundDispatcher [common]
val backgroundDispatcher: CoroutineDispatcher
Coroutine dispatcher to run tasks in a background
defaultParams [common]
val defaultParams: Parameters
Default query params to be applied to every API call, e.g.
httpClient [common]
val httpClient: HttpClient
HTTP client to make network calls
json [common]
val json: Json
maxExecuteRequestsPerSecond [common]
val maxExecuteRequestsPerSecond: Int = 3
Provide VkApi.EXECUTE_MAX_REQUESTS_PER_SECOND_DISABLED as a value to disable using of this.