index.md 2.08 KB
Newer Older
MickeyMoz's avatar
MickeyMoz committed
1
2
3
4
[android-components](../../index.md) / [mozilla.components.service.experiments](../index.md) / [ExperimentsInternalAPI](./index.md)

# ExperimentsInternalAPI

MickeyMoz's avatar
MickeyMoz committed
5
`open class ExperimentsInternalAPI` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/service/experiments/src/main/java/mozilla/components/service/experiments/Experiments.kt#L23)
MickeyMoz's avatar
MickeyMoz committed
6

MickeyMoz's avatar
MickeyMoz committed
7
This is the main experiments API, which is exposed through the global [Experiments](../-experiments.md) object.
MickeyMoz's avatar
MickeyMoz committed
8
9
10
11
12

### Functions

| Name | Summary |
|---|---|
MickeyMoz's avatar
MickeyMoz committed
13
| [initialize](initialize.md) | `fun initialize(applicationContext: <ERROR CLASS>, configuration: `[`Configuration`](../-configuration/index.md)`, onExperimentsUpdated: () -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` = null): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Initialize the experiments library. |
MickeyMoz's avatar
MickeyMoz committed
14
| [withExperiment](with-experiment.md) | `fun withExperiment(experimentId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, block: (branch: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Performs an action if the user is part of the specified experiment |
MickeyMoz's avatar
MickeyMoz committed
15

MickeyMoz's avatar
MickeyMoz committed
16
17
18
19
20
21
### Extension Functions

| Name | Summary |
|---|---|
| [loadResourceAsString](../../mozilla.components.support.test.file/kotlin.-any/load-resource-as-string.md) | `fun `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`.loadResourceAsString(path: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Loads a file from the resources folder and returns its content as a string object. |

MickeyMoz's avatar
MickeyMoz committed
22
23
24
25
### Inheritors

| Name | Summary |
|---|---|
MickeyMoz's avatar
MickeyMoz committed
26
| [Experiments](../-experiments.md) | `object Experiments : `[`ExperimentsInternalAPI`](./index.md)<br>The main Experiments object. |