//core/com.petersamokhin.vksdk.core.http/Parameters
Parameters¶
[common]\ class Parameters
Common class with parameters. Used because it is not possible to have default methods in expect classes.
Constructors¶
Parameters | [common] fun Parameters(from: Map<String, Any?>) Create parameters from map |
Parameters | [common] fun Parameters() |
Types¶
Name | Summary |
---|---|
Companion | [common] object Companion |
Functions¶
Name | Summary |
---|---|
asMap | [common] fun asMap(): Map<String, MutableCollection<Any?>> Returns copy of this params as Map |
buildJsonString | [common] fun buildJsonString(): String Build params as JSON object, e.g. |
buildQuery | [common] fun buildQuery(): String Build URL query from paramsParameters.of("user_ids" to listOf("1", 2, 3)) -> user_ids=1,2,3 |
get | [common] operator fun get(key: String): MutableCollection<Any?>? Get value for key |
put | [common] fun put(key: String, value: Any?) Sets value for key |
putAll | [common] fun putAll(other: Parameters) Add all content from another instance of Parameters [common] fun putAll(otherMap: Map<String, Any?>) Add all content from the other map |
set | [common] operator fun set(key: String, value: Any?) Sets value for key |
toString | [common] open override fun toString(): String Build string query |