gaia.sdk.rain.RainClientBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gaia-java-sdk-rain Show documentation
Show all versions of gaia-java-sdk-rain Show documentation
Generic Artificial Intelligence Application (G.A.I.A.) Software Development Kit
package gaia.sdk.rain
import gaia.sdk.api.ClientOptions
import gaia.sdk.support.HMAC
import gaia.sdk.transport.HttpTransport
class RainClientBuilder private constructor(private val url: String) {
lateinit var apiKey: String;
lateinit var secret: String;
companion object {
@JvmStatic
fun http(url: String): RainClientBuilder {
return RainClientBuilder(url)
}
}
fun withApiKey(key: String): RainClientBuilder {
this.apiKey = key
return this
}
fun withSecret(secret: String): RainClientBuilder {
this.secret = secret
return this
}
fun build(): RainClient {
val options = ClientOptions(url, apiKey, HMAC(secret))
return RainClient(options) { HttpTransport }
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy