mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-24 19:46:36 +01:00
Updated DataExtension API Builders (markdown)
parent
5692219b5d
commit
7aa4a73c92
@ -75,6 +75,27 @@ public ExtensionDataBuilder lotsOfServerData() {
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Clean value building example</summary>
|
||||
|
||||
```java
|
||||
@DataBuilderProvider
|
||||
public ExtensionDataBuilder lotsOfServerData() {
|
||||
return newExtensionDataBuilder().addValue(Long.class, this::superheroCountValue);
|
||||
}
|
||||
|
||||
private DataValue<Long> superheroCountValue() {
|
||||
return valueBuilder("Superheroes")
|
||||
.buildNumber(this::getSuperheroCount);
|
||||
}
|
||||
|
||||
private long getSuperheroCount() {
|
||||
return 0; // TODO implement later eh? :D
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
In addition to this value builder has a lot of other methods:
|
||||
```
|
||||
builder.valueBuilder("Example") // 50 char limit
|
||||
|
Loading…
Reference in New Issue
Block a user