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

commonMain.net.folivo.trixnity.clientserverapi.client.AppserviceApiClient.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.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))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy