From 0025b1af165fd333afb27efee1d745d1e4e42770 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 3 Nov 2019 02:01:27 +0100 Subject: API Documentation for KVision 2.1.0 --- api/pl.treksoft.kvision.rest/-response/-init-.html | 15 +++ api/pl.treksoft.kvision.rest/-response/data.html | 14 +++ api/pl.treksoft.kvision.rest/-response/index.html | 68 ++++++++++++++ .../-response/jq-x-h-r.html | 14 +++ .../-response/text-status.html | 14 +++ .../-rest-client/index.html | 28 ++++++ .../-rest-client/remote-request.html | 88 +++++++++++++++++ .../-rest-client/request.html | 104 +++++++++++++++++++++ api/pl.treksoft.kvision.rest/index.html | 9 ++ 9 files changed, 354 insertions(+) create mode 100644 api/pl.treksoft.kvision.rest/-response/-init-.html create mode 100644 api/pl.treksoft.kvision.rest/-response/data.html create mode 100644 api/pl.treksoft.kvision.rest/-response/index.html create mode 100644 api/pl.treksoft.kvision.rest/-response/jq-x-h-r.html create mode 100644 api/pl.treksoft.kvision.rest/-response/text-status.html create mode 100644 api/pl.treksoft.kvision.rest/-rest-client/remote-request.html create mode 100644 api/pl.treksoft.kvision.rest/-rest-client/request.html (limited to 'api/pl.treksoft.kvision.rest') diff --git a/api/pl.treksoft.kvision.rest/-response/-init-.html b/api/pl.treksoft.kvision.rest/-response/-init-.html new file mode 100644 index 00000000..2388a3d6 --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-response/-init-.html @@ -0,0 +1,15 @@ + + + +Response.<init> - kvision + + + +kvision / pl.treksoft.kvision.rest / Response / <init>
+
+

<init>

+ +Response(data: T, textStatus: String, jqXHR: JQueryXHR) +

A response wrapper

+ + diff --git a/api/pl.treksoft.kvision.rest/-response/data.html b/api/pl.treksoft.kvision.rest/-response/data.html new file mode 100644 index 00000000..e129278e --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-response/data.html @@ -0,0 +1,14 @@ + + + +Response.data - kvision + + + +kvision / pl.treksoft.kvision.rest / Response / data
+
+

data

+ +val data: T + + diff --git a/api/pl.treksoft.kvision.rest/-response/index.html b/api/pl.treksoft.kvision.rest/-response/index.html new file mode 100644 index 00000000..3c2a3d0d --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-response/index.html @@ -0,0 +1,68 @@ + + + +Response - kvision + + + +kvision / pl.treksoft.kvision.rest / Response
+
+

Response

+data class Response<T> +

A response wrapper

+

Constructors

+ + + + + + + +
+

<init>

+
+Response(data: T, textStatus: String, jqXHR: JQueryXHR) +

A response wrapper

+
+

Properties

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

data

+
+val data: T
+

jqXHR

+
+val jqXHR: JQueryXHR
+

textStatus

+
+val textStatus: String
+

Extension Functions

+ + + + + + + +
+

createInstance

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

Helper function for creating JavaScript objects from dynamic constructors.

+
+ + diff --git a/api/pl.treksoft.kvision.rest/-response/jq-x-h-r.html b/api/pl.treksoft.kvision.rest/-response/jq-x-h-r.html new file mode 100644 index 00000000..6559ca4e --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-response/jq-x-h-r.html @@ -0,0 +1,14 @@ + + + +Response.jqXHR - kvision + + + +kvision / pl.treksoft.kvision.rest / Response / jqXHR
+
+

jqXHR

+ +val jqXHR: JQueryXHR + + diff --git a/api/pl.treksoft.kvision.rest/-response/text-status.html b/api/pl.treksoft.kvision.rest/-response/text-status.html new file mode 100644 index 00000000..dcfd666c --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-response/text-status.html @@ -0,0 +1,14 @@ + + + +Response.textStatus - kvision + + + +kvision / pl.treksoft.kvision.rest / Response / textStatus
+
+

textStatus

+ +val textStatus: String + + diff --git a/api/pl.treksoft.kvision.rest/-rest-client/index.html b/api/pl.treksoft.kvision.rest/-rest-client/index.html index a0291ef4..84ebc28e 100644 --- a/api/pl.treksoft.kvision.rest/-rest-client/index.html +++ b/api/pl.treksoft.kvision.rest/-rest-client/index.html @@ -55,6 +55,34 @@

Makes a remote call to the remote server.

+ + +

remoteRequest

+ + +fun remoteRequest(url: String, data: dynamic = null, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<Response<dynamic>>
+fun <T : Any> remoteRequest(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<Response<T>>
+fun <V : Any> remoteRequest(url: String, serializer: SerializationStrategy<V>, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<Response<dynamic>>
+fun <T : Any, V : Any> remoteRequest(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<Response<T>> +

Makes a remote call to the remote server.

+ + + + +

request

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

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

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

Helper inline function to automatically get serializer for the data.

+fun <T : Any, V : Any> request(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<Response<T>> +

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

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

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

+ +

Extension Functions

diff --git a/api/pl.treksoft.kvision.rest/-rest-client/remote-request.html b/api/pl.treksoft.kvision.rest/-rest-client/remote-request.html new file mode 100644 index 00000000..8ef4c969 --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-rest-client/remote-request.html @@ -0,0 +1,88 @@ + + + +RestClient.remoteRequest - kvision + + + +kvision / pl.treksoft.kvision.rest / RestClient / remoteRequest
+
+

remoteRequest

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

Makes a remote call to the remote server.

+

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 response

+ +fun <T : Any> remoteRequest(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<Response<T>> +

Makes a remote call to the remote server.

+

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 response

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

Makes a remote call to the remote server.

+

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

+

Return
+a promise of the response

+ +fun <T : Any, V : Any> remoteRequest(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<Response<T>> +

Makes a remote call to the remote server.

+

Parameters

+

+url - an URL address

+

+serializer - for the data

+

+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 response

+ + diff --git a/api/pl.treksoft.kvision.rest/-rest-client/request.html b/api/pl.treksoft.kvision.rest/-rest-client/request.html new file mode 100644 index 00000000..8c333ddd --- /dev/null +++ b/api/pl.treksoft.kvision.rest/-rest-client/request.html @@ -0,0 +1,104 @@ + + + +RestClient.request - kvision + + + +kvision / pl.treksoft.kvision.rest / RestClient / request
+
+

request

+ +inline fun <reified T : Any> request(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<Response<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 response

+ +inline fun <reified V : Any> request(url: String, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", noinline beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null): Promise<Response<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 response

+ +inline fun <T : Any, reified V : Any> request(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<Response<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 response

+ +inline fun <reified T : Any, V : Any> request(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<Response<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 response

+ +inline fun <reified T : Any, reified V : Any> request(url: String, data: V, method: HttpMethod = HttpMethod.GET, contentType: String = "application/json", noinline beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, noinline transform: ((dynamic) -> dynamic)? = null): Promise<Response<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 response

+ + diff --git a/api/pl.treksoft.kvision.rest/index.html b/api/pl.treksoft.kvision.rest/index.html index 252116c8..c4423f46 100644 --- a/api/pl.treksoft.kvision.rest/index.html +++ b/api/pl.treksoft.kvision.rest/index.html @@ -21,6 +21,15 @@ +

Response

+ + +data class Response<T> +

A response wrapper

+ + + +

RestClient

-- cgit