decorative yellow lines on background

We wanted to repost his Medium article with his library to share with our broader community. Take a look and keep the conversation going in our Slack developer community.

What is poetimizely?

poetimizely is a library to generate type safe accessors for Optimizely experiments and features.

Why should I use it?

Experiments ๐Ÿงช

val variation = optimizelyClient.activate("experiment-key", userId) when (variation?.key) { "variation-1" -> TODO() "variation-2" -> TODO() null -> TODO() }

val variation = optimizelyClient.getVariationForExperiment(Experiments.TestExperiment, userId) when (variation?.key) { TestExperimentVariations.VARIATION_1 -> TODO() TestExperimentVariations.VARIATION_2 -> TODO() null -> TODO() }

Features ๐Ÿ’ก

val enabled = optimizelyClient.isFeatureEnabled("feature-key", userId)

val enabled = optimizelyClient.isFeatureEnabled(Features.FEATURE_KEY, userId)