MatrixApiClient

open class MatrixApiClient(val contentMappings: EventContentSerializerMappings = EventContentSerializerMappings.default, val json: Json = createMatrixEventJson(contentMappings), httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null) : AutoCloseable

Constructors

Link copied to clipboard
constructor(contentMappings: EventContentSerializerMappings = EventContentSerializerMappings.default, json: Json = createMatrixEventJson(contentMappings), 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 : 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>