ApiClient

abstract class ApiClient

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val accessToken: String?

Access token to use for requests. Appended to all requests if set.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val baseUrl: String?

URL to use as base for API endpoints. Should include the protocol and may contain a path.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val clientInfo: <Error class: unknown class>

Information about the client / application send in all API requests.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val deviceInfo: <Error class: unknown class>

Information about the device send in all API requests. Only a single session is allowed per device id.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

HTTP Options for this ApiClient.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val webSocket: SocketApi

Get the instance of the SocketApi for this ApiClient.

Link copied to clipboard

Functions

Link copied to clipboard
open fun createUrl(pathTemplate: String, pathParameters: Map<String, Any?> = emptyMap(), queryParameters: Map<String, Any?> = emptyMap(), ignorePathParameters: Boolean = false): String

Create a complete url based on the baseUrl and given parameters. Uses UrlBuilder to create the path from the pathTemplate and pathParameters.

Link copied to clipboard
inline suspend fun <T : Any> ApiClient.delete(pathTemplate: String, pathParameters: Map<String, Any?> = emptyMap(), queryParameters: Map<String, Any?> = emptyMap(), requestBody: Any? = null): Response<T>
Link copied to clipboard
inline suspend fun <T : Any> ApiClient.get(pathTemplate: String, pathParameters: Map<String, Any?> = emptyMap(), queryParameters: Map<String, Any?> = emptyMap(), requestBody: Any? = null): Response<T>
Link copied to clipboard
inline fun <T : Api> getOrCreateApi(noinline create: (apiClient: ApiClient) -> T): T
fun <T : Api> getOrCreateApi(kclass: KClass<T>, create: (apiClient: ApiClient) -> T): T
Link copied to clipboard
inline suspend fun <T : Any> ApiClient.post(pathTemplate: String, pathParameters: Map<String, Any?> = emptyMap(), queryParameters: Map<String, Any?> = emptyMap(), requestBody: Any? = null): Response<T>
Link copied to clipboard
abstract suspend fun request(method: HttpMethod = HttpMethod.GET, pathTemplate: String, pathParameters: Map<String, Any?> = emptyMap(), queryParameters: Map<String, Any?> = emptyMap(), requestBody: Any? = null): RawResponse
Link copied to clipboard
abstract fun update(baseUrl: String? = this.baseUrl, accessToken: String? = this.accessToken, clientInfo: <Error class: unknown class> = this.clientInfo, deviceInfo: <Error class: unknown class> = this.deviceInfo)

Change the authorization values used in this ApiClient instance.