vers-sdk v0.1.8
It is generated with Sterling.
dependencies {
implementation("com.vers.sdk:vers-sdk:0.1.8")
}implementation 'com.vers.sdk:vers-sdk:0.1.8'import com.vers.sdk.VersSdkClient
import kotlinx.coroutines.runBlocking
fun main() = runBlocking {
val client = VersSdkClient(
apiKey = "your-api-key",
)
client.use {
// Call API methods
// val response = it.someOperation()
}
}| Parameter | Environment Variable | Default | Description |
|---|---|---|---|
baseUrl |
VERS_BASE_URL |
https://api.vers.sh |
API base URL |
apiKey |
VERS_API_KEY |
— | Bearer token for authentication |
maxRetries |
— | 2 |
Maximum retry attempts |
timeout |
— | 30 |
Request timeout in seconds |
import com.vers.sdk.*
try {
val response = client.someOperation()
} catch (e: NotFoundError) {
println("Resource not found: ${e.status}")
} catch (e: RateLimitError) {
println("Rate limited, retry later")
} catch (e: APIError) {
println("API error: ${e.status} - ${e.message}")
} catch (e: APIConnectionError) {
println("Connection failed: ${e.message}")
}Set the VERS_LOG environment variable to control log verbosity:
debug— all request/response detailsinfo— retries and important eventswarn— warnings (default)error— errors onlyoff— no logging
Apache-2.0