From fb7ff5b8bf2073a8d7b78011b9edffc830dc63cb Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 26 Oct 2019 00:17:24 +0200 Subject: API documentation for KVision 2.0.0 --- .../-rest-client/index.html | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 api1/pl.treksoft.kvision.rest/-rest-client/index.html (limited to 'api1/pl.treksoft.kvision.rest/-rest-client/index.html') diff --git a/api1/pl.treksoft.kvision.rest/-rest-client/index.html b/api1/pl.treksoft.kvision.rest/-rest-client/index.html new file mode 100644 index 00000000..a0291ef4 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-rest-client/index.html @@ -0,0 +1,75 @@ + + + +RestClient - kvision + + + +kvision / pl.treksoft.kvision.rest / RestClient
+
+

RestClient

+open class RestClient +

An agent responsible for remote calls.

+

Constructors

+ + + + + + + +
+

<init>

+
+RestClient() +

An agent responsible for remote calls.

+
+

Functions

+ + + + + + + + + + + +
+

call

+
+fun <T : Any> call(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<T> +

Helper inline function to automatically get deserializer for the result value with dynamic data.

+fun <V : Any> call(url: String, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<dynamic>
+fun <T : Any, V : Any> call(url: String, data: V, deserializer: DeserializationStrategy<T>, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<T> +

Helper inline function to automatically get serializer for the data.

+fun <T : Any, V : Any> call(url: String, serializer: SerializationStrategy<V>, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<T> +

Helper inline function to automatically deserializer for the result value with typed data.

+fun <T : Any, V : Any> call(url: String, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<T> +

Helper inline function to automatically get serializer for the data and deserializer for the result value.

+
+

remoteCall

+
+fun remoteCall(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<dynamic>
+fun <T : Any> remoteCall(url: String, data: dynamic = null, deserializer: DeserializationStrategy<T>, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<T>
+fun <V : Any> remoteCall(url: String, serializer: SerializationStrategy<V>, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<dynamic>
+fun <T : Any, V : Any> remoteCall(url: String, serializer: SerializationStrategy<V>, data: V, deserializer: DeserializationStrategy<T>, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null): Promise<T> +

Makes a remote call to the remote server.

+
+

Extension Functions

+ + + + + + + +
+

createInstance

+
+fun <T> Any?.createInstance(vararg args: dynamic): T +

Helper function for creating JavaScript objects from dynamic constructors.

+
+ + -- cgit