MatrixClientServerApiBaseClient

class MatrixClientServerApiBaseClient(val baseUrl: Url? = null, authProvider: MatrixAuthProvider = MatrixAuthProvider.classicInMemory(), onLogout: suspend (LogoutInfo) -> Unit = { }, eventContentSerializerMappings: EventContentSerializerMappings = DefaultEventContentSerializerMappings, json: Json = createMatrixEventJson(eventContentSerializerMappings), httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null) : MatrixApiClient

Constructors

Link copied to clipboard
constructor(baseUrl: Url? = null, authProvider: MatrixAuthProvider = MatrixAuthProvider.classicInMemory(), onLogout: suspend (LogoutInfo) -> Unit = { }, eventContentSerializerMappings: EventContentSerializerMappings = DefaultEventContentSerializerMappings, json: Json = createMatrixEventJson(eventContentSerializerMappings), httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null)

Properties

Link copied to clipboard
val baseClient: HttpClient
Link copied to clipboard
val baseUrl: Url? = null
Link copied to clipboard
val contentMappings: EventContentSerializerMappings
Link copied to clipboard
val json: Json

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
inline suspend fun <ENDPOINT : MatrixEndpoint<Unit, RESPONSE>, RESPONSE> request(endpoint: ENDPOINT, requestBuilder: HttpRequestBuilder.() -> Unit): Result<RESPONSE>
inline suspend fun <ENDPOINT : MatrixEndpoint<REQUEST, RESPONSE>, REQUEST, RESPONSE> request(endpoint: ENDPOINT, body: REQUEST, requestBuilder: HttpRequestBuilder.() -> Unit): Result<RESPONSE>
Link copied to clipboard
inline suspend fun <ENDPOINT : MatrixUIAEndpoint<Unit, RESPONSE>, RESPONSE> uiaRequest(endpoint: ENDPOINT, noinline requestBuilder: HttpRequestBuilder.() -> Unit = {}): Result<UIA<RESPONSE>>
inline suspend fun <ENDPOINT : MatrixUIAEndpoint<REQUEST, RESPONSE>, REQUEST, RESPONSE> uiaRequest(endpoint: ENDPOINT, requestBody: REQUEST, noinline requestBuilder: HttpRequestBuilder.() -> Unit = {}): Result<UIA<RESPONSE>>
Link copied to clipboard
inline suspend fun <ENDPOINT : MatrixEndpoint<Unit, RESPONSE>, RESPONSE, T> withRequest(endpoint: ENDPOINT, requestBuilder: HttpRequestBuilder.() -> Unit, noinline responseHandler: suspend (RESPONSE) -> T): Result<T>
inline suspend fun <ENDPOINT : MatrixEndpoint<REQUEST, RESPONSE>, REQUEST, RESPONSE, T> withRequest(endpoint: ENDPOINT, body: REQUEST, requestBuilder: HttpRequestBuilder.() -> Unit, noinline responseHandler: suspend (RESPONSE) -> T): Result<T>