Skip to content

Commit af9fb28

Browse files
committed
Update README.md
1 parent 0d22fd2 commit af9fb28

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@ argument containing the additional configuration options for
2121
the [ConfigCat Kotlin SDK](https://github.com/configcat/kotlin-sdk):
2222

2323
```kotlin
24-
// TODO
24+
// Configure the provider.
25+
val provider = ConfigCatProvider("<YOUR-CONFIGCAT-SDK-KEY>") {
26+
pollingMode = autoPoll { pollingInterval = 60.seconds }
27+
}
28+
29+
// Configure the OpenFeature API with the ConfigCat provider.
30+
OpenFeatureAPI.setProviderAndWait(provider)
31+
32+
// Create a client.
33+
val client = OpenFeatureAPI.getClient()
34+
35+
// Evaluate feature flag.
36+
val isAwesomeFeatureEnabled = client.getBooleanDetails("isAwesomeFeatureEnabled", false)
2537
```
2638

2739
For more information about all the configuration options, see

0 commit comments

Comments
 (0)