All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.net.folivo.trixnity.clientserverapi.client.DiscoveryApiClient.kt Maven / Gradle / Ivy

There is a newer version: 4.11.2
Show newest version
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