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 --- .../-h-t-t-p_-u-n-a-u-t-h-o-r-i-z-e-d.html | 15 +++ .../-http-method/-d-e-l-e-t-e.html | 14 +++ .../-http-method/-g-e-t.html | 14 +++ .../-http-method/-o-p-t-i-o-n-s.html | 14 +++ .../-http-method/-p-o-s-t.html | 14 +++ .../-http-method/-p-u-t.html | 14 +++ .../-http-method/index.html | 67 +++++++++++++ .../-rest-client/-init-.html | 15 +++ .../-rest-client/call.html | 104 +++++++++++++++++++++ .../-rest-client/index.html | 75 +++++++++++++++ .../-rest-client/remote-call.html | 88 +++++++++++++++++ api1/pl.treksoft.kvision.rest/index.html | 48 ++++++++++ 12 files changed, 482 insertions(+) create mode 100644 api1/pl.treksoft.kvision.rest/-h-t-t-p_-u-n-a-u-t-h-o-r-i-z-e-d.html create mode 100644 api1/pl.treksoft.kvision.rest/-http-method/-d-e-l-e-t-e.html create mode 100644 api1/pl.treksoft.kvision.rest/-http-method/-g-e-t.html create mode 100644 api1/pl.treksoft.kvision.rest/-http-method/-o-p-t-i-o-n-s.html create mode 100644 api1/pl.treksoft.kvision.rest/-http-method/-p-o-s-t.html create mode 100644 api1/pl.treksoft.kvision.rest/-http-method/-p-u-t.html create mode 100644 api1/pl.treksoft.kvision.rest/-http-method/index.html create mode 100644 api1/pl.treksoft.kvision.rest/-rest-client/-init-.html create mode 100644 api1/pl.treksoft.kvision.rest/-rest-client/call.html create mode 100644 api1/pl.treksoft.kvision.rest/-rest-client/index.html create mode 100644 api1/pl.treksoft.kvision.rest/-rest-client/remote-call.html create mode 100644 api1/pl.treksoft.kvision.rest/index.html (limited to 'api1/pl.treksoft.kvision.rest') diff --git a/api1/pl.treksoft.kvision.rest/-h-t-t-p_-u-n-a-u-t-h-o-r-i-z-e-d.html b/api1/pl.treksoft.kvision.rest/-h-t-t-p_-u-n-a-u-t-h-o-r-i-z-e-d.html new file mode 100644 index 00000000..90a6d361 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-h-t-t-p_-u-n-a-u-t-h-o-r-i-z-e-d.html @@ -0,0 +1,15 @@ + + + +HTTP_UNAUTHORIZED - kvision + + + +kvision / pl.treksoft.kvision.rest / HTTP_UNAUTHORIZED
+
+

HTTP_UNAUTHORIZED

+ +const val HTTP_UNAUTHORIZED: Int +

HTTP status unauthorized (401).

+ + diff --git a/api1/pl.treksoft.kvision.rest/-http-method/-d-e-l-e-t-e.html b/api1/pl.treksoft.kvision.rest/-http-method/-d-e-l-e-t-e.html new file mode 100644 index 00000000..0bad82c6 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-http-method/-d-e-l-e-t-e.html @@ -0,0 +1,14 @@ + + + +HttpMethod.DELETE - kvision + + + +kvision / pl.treksoft.kvision.rest / HttpMethod / DELETE
+
+

DELETE

+ +DELETE + + diff --git a/api1/pl.treksoft.kvision.rest/-http-method/-g-e-t.html b/api1/pl.treksoft.kvision.rest/-http-method/-g-e-t.html new file mode 100644 index 00000000..819c9b9f --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-http-method/-g-e-t.html @@ -0,0 +1,14 @@ + + + +HttpMethod.GET - kvision + + + +kvision / pl.treksoft.kvision.rest / HttpMethod / GET
+
+

GET

+ +GET + + diff --git a/api1/pl.treksoft.kvision.rest/-http-method/-o-p-t-i-o-n-s.html b/api1/pl.treksoft.kvision.rest/-http-method/-o-p-t-i-o-n-s.html new file mode 100644 index 00000000..3f5f50ca --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-http-method/-o-p-t-i-o-n-s.html @@ -0,0 +1,14 @@ + + + +HttpMethod.OPTIONS - kvision + + + +kvision / pl.treksoft.kvision.rest / HttpMethod / OPTIONS
+
+

OPTIONS

+ +OPTIONS + + diff --git a/api1/pl.treksoft.kvision.rest/-http-method/-p-o-s-t.html b/api1/pl.treksoft.kvision.rest/-http-method/-p-o-s-t.html new file mode 100644 index 00000000..081df335 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-http-method/-p-o-s-t.html @@ -0,0 +1,14 @@ + + + +HttpMethod.POST - kvision + + + +kvision / pl.treksoft.kvision.rest / HttpMethod / POST
+
+

POST

+ +POST + + diff --git a/api1/pl.treksoft.kvision.rest/-http-method/-p-u-t.html b/api1/pl.treksoft.kvision.rest/-http-method/-p-u-t.html new file mode 100644 index 00000000..f3476483 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-http-method/-p-u-t.html @@ -0,0 +1,14 @@ + + + +HttpMethod.PUT - kvision + + + +kvision / pl.treksoft.kvision.rest / HttpMethod / PUT
+
+

PUT

+ +PUT + + diff --git a/api1/pl.treksoft.kvision.rest/-http-method/index.html b/api1/pl.treksoft.kvision.rest/-http-method/index.html new file mode 100644 index 00000000..9958de2f --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-http-method/index.html @@ -0,0 +1,67 @@ + + + +HttpMethod - kvision + + + +kvision / pl.treksoft.kvision.rest / HttpMethod
+
+

HttpMethod

+enum class HttpMethod +

Enum Values

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

GET

+
+
+

POST

+
+
+

PUT

+
+
+

DELETE

+
+
+

OPTIONS

+
+
+

Extension Functions

+ + + + + + + +
+

createInstance

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

Helper function for creating JavaScript objects from dynamic constructors.

+
+ + diff --git a/api1/pl.treksoft.kvision.rest/-rest-client/-init-.html b/api1/pl.treksoft.kvision.rest/-rest-client/-init-.html new file mode 100644 index 00000000..bdfe37aa --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-rest-client/-init-.html @@ -0,0 +1,15 @@ + + + +RestClient.<init> - kvision + + + +kvision / pl.treksoft.kvision.rest / RestClient / <init>
+
+

<init>

+ +RestClient() +

An agent responsible for remote calls.

+ + diff --git a/api1/pl.treksoft.kvision.rest/-rest-client/call.html b/api1/pl.treksoft.kvision.rest/-rest-client/call.html new file mode 100644 index 00000000..a1004fe5 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-rest-client/call.html @@ -0,0 +1,104 @@ + + + +RestClient.call - kvision + + + +kvision / pl.treksoft.kvision.rest / RestClient / 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/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.

+
+ + diff --git a/api1/pl.treksoft.kvision.rest/-rest-client/remote-call.html b/api1/pl.treksoft.kvision.rest/-rest-client/remote-call.html new file mode 100644 index 00000000..b1025d7b --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/-rest-client/remote-call.html @@ -0,0 +1,88 @@ + + + +RestClient.remoteCall - kvision + + + +kvision / pl.treksoft.kvision.rest / RestClient / remoteCall
+
+

remoteCall

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

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

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 result

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

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 result

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

+

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 result

+ + diff --git a/api1/pl.treksoft.kvision.rest/index.html b/api1/pl.treksoft.kvision.rest/index.html new file mode 100644 index 00000000..252116c8 --- /dev/null +++ b/api1/pl.treksoft.kvision.rest/index.html @@ -0,0 +1,48 @@ + + + +pl.treksoft.kvision.rest - kvision + + + +kvision / pl.treksoft.kvision.rest
+
+

Package pl.treksoft.kvision.rest

+

RESTful API client with support for type-safe connectivity.

+

Types

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

HttpMethod

+
+enum class HttpMethod
+

RestClient

+
+open class RestClient +

An agent responsible for remote calls.

+
+

Properties

+ + + + + + + +
+

HTTP_UNAUTHORIZED

+
+const val HTTP_UNAUTHORIZED: Int +

HTTP status unauthorized (401).

+
+ + -- cgit