class Fretboard
(source)
Entry point of the library
Fretboard(source: ExperimentSource, storage: ExperimentStorage, valuesProvider: ValuesProvider = ValuesProvider())
Entry point of the library |
val experiments: List<Experiment>
Provides the list of experiments (active or not) |
fun clearAllOverrides(context: Context): Unit
Clears all experiment overrides asynchronously |
|
fun clearAllOverridesNow(context: Context): Unit
Clears all experiment overrides as a blocking operation |
|
fun clearOverride(context: Context, descriptor: ExperimentDescriptor): Unit
Clears an override for a specified experiment asynchronously |
|
fun clearOverrideNow(context: Context, descriptor: ExperimentDescriptor): Unit
Clears an override for a specified experiment as a blocking operation |
|
fun getActiveExperiments(context: Context): List<Experiment>
Provides the list of active experiments |
|
fun getExperiment(descriptor: ExperimentDescriptor): Experiment?
Gets the metadata associated with the specified experiment, even if the user is not part of it |
|
fun getExperimentsMap(context: Context): Map<String, Boolean>
Provides a map of active/inactive experiments |
|
fun getUserBucket(context: Context): Int
Returns the user bucket number used to determine whether the user is in or out of the experiment |
|
fun isInExperiment(context: Context, descriptor: ExperimentDescriptor): Boolean
Checks if the user is part of the specified experiment |
|
fun loadExperiments(): Unit
Loads experiments from local storage |
|
fun setOverride(context: Context, descriptor: ExperimentDescriptor, active: Boolean): Unit
Overrides a specified experiment asynchronously |
|
fun setOverrideNow(context: Context, descriptor: ExperimentDescriptor, active: Boolean): Unit
Overrides a specified experiment as a blocking operation |
|
fun updateExperiments(): Boolean
Requests new experiments from the server and saves them to local storage |
|
fun withExperiment(context: Context, descriptor: ExperimentDescriptor, block: (Experiment) -> Unit): Unit
Performs an action if the user is part of the specified experiment |