commonMain.net.folivo.trixnity.clientserverapi.client.DiscoveryApiClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trixnity-clientserverapi-client Show documentation
Show all versions of trixnity-clientserverapi-client Show documentation
Multiplatform Kotlin SDK for matrix-protocol
package net.folivo.trixnity.clientserverapi.client
import net.folivo.trixnity.clientserverapi.model.authentication.DiscoveryInformation
import net.folivo.trixnity.clientserverapi.model.discovery.GetSupport
import net.folivo.trixnity.clientserverapi.model.discovery.GetWellKnown
interface DiscoveryApiClient {
/**
* @see [GetWellKnown]
*/
suspend fun getWellKnown(): Result
/**
* @see [GetSupport]
*/
suspend fun getSupport(): Result
}
class DiscoveryApiClientImpl(
private val httpClient: MatrixClientServerApiHttpClient
) : DiscoveryApiClient {
override suspend fun getWellKnown(): Result =
httpClient.request(GetWellKnown)
override suspend fun getSupport(): Result =
httpClient.request(GetSupport)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy