MatrixClientServerApiBaseClient

class MatrixClientServerApiBaseClient(authProvider: MatrixClientAuthProvider, eventContentSerializerMappings: EventContentSerializerMappings = EventContentSerializerMappings.default, json: Json = createMatrixEventJson(eventContentSerializerMappings), asUserId: UserId? = null, asDeviceId: String? = null, httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null) : MatrixApiClient

Constructors

Link copied to clipboard
constructor(authProvider: MatrixClientAuthProvider, eventContentSerializerMappings: EventContentSerializerMappings = EventContentSerializerMappings.default, json: Json = createMatrixEventJson(eventContentSerializerMappings), asUserId: UserId? = null, asDeviceId: String? = null, httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null)

Properties

Link copied to clipboard
val baseClient: HttpClient
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>