Companion

object Companion

Properties

Link copied to clipboard

Default baseUrl for cloud.

Link copied to clipboard

Json instance used by default: unknown keys ignored, nulls and defaults omitted on encode.

Link copied to clipboard
const val LATEST_API_VERSION: Int = 5

carbone-version header value used by cloud.

Link copied to clipboard

SDK version as recorded in the jar manifest (Implementation-Version), used in the default User-Agent. dev when Karbone is not loaded from its jar (tests, IDE).

Functions

Link copied to clipboard
fun cloud(apiKey: String, configure: KarboneConfig.Builder.() -> Unit = {}): KarboneConfig

Config for Carbone Cloud, authenticated with apiKey and sending LATEST_API_VERSION.

Link copied to clipboard
fun onPremise(baseUrl: String, token: String? = null, configure: KarboneConfig.Builder.() -> Unit = {}): KarboneConfig

Config for a self-hosted Carbone instance at baseUrl. token is optional since authentication is disabled by default on-premise; no carbone-version header is sent.