commonMain.net.folivo.trixnity.clientserverapi.client.AppserviceApiClient.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.appservice.Ping
interface AppserviceApiClient {
/**
* @see [Ping]
*/
suspend fun ping(appserviceId: String, transactionId: String? = null): Result
}
class AppserviceApiClientImpl(
private val httpClient: MatrixClientServerApiHttpClient
) : AppserviceApiClient {
override suspend fun ping(appserviceId: String, transactionId: String?): Result =
httpClient.request(Ping(appserviceId), Ping.Request(transactionId))
}