Kotlin SDK
com.revieve:revieve-sdk — a thin, typed client for analyzeImage. Source lives in sdks/kotlin/.
Install
Section titled “Install”dependencies { implementation("com.revieve:revieve-sdk:0.1.0")}Targets JVM 17+ and Android (minimum API level depends on your Ktor configuration; OkHttp engine works back to API 21).
Quick start
Section titled “Quick start”import com.revieve.*
SkinAnalysisClient(partnerId = "jmlv6b2qtS").use { revieve -> val result = revieve.analyzeImage( image = imageBytes, components = listOf(Component.WRINKLES, Component.REDNESS, Component.SKIN_AGE), gender = Gender.UNKNOWN, skintone = 0, ) println(result.message)}Errors
Section titled “Errors”try { val result = revieve.analyzeImage(image = imageBytes) render(result)} catch (err: RevieveException.Analysis) { showToast(err.message ?: "Analysis failed") log(err.firstErrorIdx)} catch (err: RevieveException.Network) { log(err) throw err}Test injection
Section titled “Test injection”Pass a mock HttpClient to swap the underlying engine for unit tests:
val mock = HttpClient(MockEngine) { install(ContentNegotiation) { json() } engine { addHandler { request -> respond(fixtureBody, HttpStatusCode.OK) } }}val revieve = SkinAnalysisClient(partnerId = "test", http = mock)Coroutines
Section titled “Coroutines”analyzeImage is suspend. Call from a coroutine scope; on Android use viewModelScope or lifecycleScope. Kotlin Multiplatform support is on the roadmap but not v0.1.