From c7169d6e9dec101fc5523f84766b6fd0c3ecb656 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 16 Feb 2019 23:29:42 +0100 Subject: API documentation for KVision 0.0.25 --- .../-call-agent/call.html | 104 +++++++++++++++++++++ .../-call-agent/index.html | 23 ++++- .../-call-agent/json-rpc-call.html | 8 +- .../-call-agent/remote-call.html | 64 +++++++++++++ 4 files changed, 193 insertions(+), 6 deletions(-) create mode 100644 api/pl.treksoft.kvision.remote/-call-agent/call.html (limited to 'api/pl.treksoft.kvision.remote/-call-agent') diff --git a/api/pl.treksoft.kvision.remote/-call-agent/call.html b/api/pl.treksoft.kvision.remote/-call-agent/call.html new file mode 100644 index 00000000..5d908ee6 --- /dev/null +++ b/api/pl.treksoft.kvision.remote/-call-agent/call.html @@ -0,0 +1,104 @@ + + + +CallAgent.call - kvision + + + +kvision / pl.treksoft.kvision.remote / CallAgent / call
+
+

call

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

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

+

Parameters

+

+url - an URL address

+

+data - data to be sent

+

+method - a HTTP method

+

+contentType - a content type of the request

+

+beforeSend - a content type of the request

+

+transform - a function to transform the result of the call

+

Return
+a promise of the result

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

Helper inline function to automatically get serializer for the data.

+

Parameters

+

+url - an URL address

+

+data - data to be sent

+

+method - a HTTP method

+

+contentType - a content type of the request

+

+beforeSend - a content type of the request

+

Return
+a promise of the result

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

Helper inline function to automatically get serializer for the data.

+

Parameters

+

+url - an URL address

+

+data - data to be sent

+

+deserializer - a deserializer for the result value

+

+method - a HTTP method

+

+contentType - a content type of the request

+

+beforeSend - a content type of the request

+

+transform - a function to transform the result of the call

+

Return
+a promise of the result

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

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

+

Parameters

+

+url - an URL address

+

+serializer - for the data

+

+data - data to be sent

+

+method - a HTTP method

+

+contentType - a content type of the request

+

+beforeSend - a content type of the request

+

+transform - a function to transform the result of the call

+

Return
+a promise of the result

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

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

+

Parameters

+

+url - an URL address

+

+data - data to be sent

+

+method - a HTTP method

+

+contentType - a content type of the request

+

+beforeSend - a content type of the request

+

+transform - a function to transform the result of the call

+

Return
+a promise of the result

+ + diff --git a/api/pl.treksoft.kvision.remote/-call-agent/index.html b/api/pl.treksoft.kvision.remote/-call-agent/index.html index 041e1ef1..650b46ef 100644 --- a/api/pl.treksoft.kvision.remote/-call-agent/index.html +++ b/api/pl.treksoft.kvision.remote/-call-agent/index.html @@ -29,10 +29,26 @@ +

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.

+ + + +

jsonRpcCall

-fun jsonRpcCall(url: String, data: List<String?> = listOf(), method: RpcHttpMethod = RpcHttpMethod.POST): Promise<String> +fun jsonRpcCall(url: String, data: List<String?> = listOf(), method: HttpMethod = HttpMethod.POST): Promise<String>

Makes an JSON-RPC call to the remote server.

@@ -41,7 +57,10 @@

remoteCall

-fun remoteCall(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: (JQueryXHR, JQueryAjaxSettings) -> Boolean = null): Promise<dynamic> +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