Package-level declarations

Types

Link copied to clipboard

The EquinoxBaseEndpointsSet class is a container with all the Equinox's system base endpoints

Link copied to clipboard
abstract class Requester(    var host: String,     var userId: String? = null,     var userToken: String? = null,     var debugMode: Boolean = false,     val connectionTimeout: Long = DEFAULT_REQUEST_TIMEOUT,     val connectionErrorMessage: String,     val byPassSSLValidation: Boolean = false)

The Requester class is useful to communicate with backend based on the SpringBoot framework

Link copied to clipboard

RequestMethod list of available request methods

Link copied to clipboard

ResponseStatus list of available response status code

Functions

Link copied to clipboard
private fun isSuccessfulResponse(response: JsonObject?): ResponseStatus

Method used to get whether the request has been successful or not

Link copied to clipboard
private fun <T> preparePage(jPage: JsonObject, serializer: KSerializer<T>): PaginatedResponse<T>

Method used to prepare and to format the raw JsonObject obtained with the sendPaginatedRequest or sendPaginatedRequestAsyncHandlers methods in a PaginatedResponse

Link copied to clipboard
suspend fun <R : Requester, T> R.sendPaginatedRequest(    request: suspend R.() -> JsonObject,     serializer: KSerializer<T>,     onSuccess: (PaginatedResponse<T>) -> Unit,     onFailure: (JsonObject) -> Unit,     onConnectionError: (JsonObject) -> Unit? = null)

Method used to execute and handle the paginated response of the request

Link copied to clipboard
suspend fun <R : Requester, T> R.sendPaginatedRequestAsyncHandlers(    request: suspend R.() -> JsonObject,     serializer: KSerializer<T>,     onSuccess: suspend (PaginatedResponse<T>) -> Unit,     onFailure: suspend (JsonObject) -> Unit,     onConnectionError: suspend (JsonObject) -> Unit? = null)

Method used to execute and handle the paginated response of the request

Link copied to clipboard
suspend fun <R : Requester> R.sendRequest(    request: suspend R.() -> JsonObject,     onResponse: (JsonObject) -> Unit,     onConnectionError: (JsonObject) -> Unit? = null)
suspend fun <R : Requester> R.sendRequest(    request: suspend R.() -> JsonObject,     onSuccess: (JsonObject) -> Unit,     onFailure: (JsonObject) -> Unit,     onConnectionError: (JsonObject) -> Unit? = null)

Method used to execute and handle the response of the request

Link copied to clipboard
suspend fun <R : Requester> R.sendRequestAsyncHandlers(    request: suspend R.() -> JsonObject,     onResponse: suspend (JsonObject) -> Unit,     onConnectionError: suspend (JsonObject) -> Unit? = null)
suspend fun <R : Requester> R.sendRequestAsyncHandlers(    request: suspend R.() -> JsonObject,     onSuccess: suspend (JsonObject) -> Unit,     onFailure: suspend (JsonObject) -> Unit,     onConnectionError: suspend (JsonObject) -> Unit? = null)

Method used to execute and handle the response of the request

Link copied to clipboard

Method used to validate a self-signed SLL certificate and bypass the checks of its validity

Method used to validate a self-signed SLL certificate and bypass the checks of its validity