Updated DataExtension API Builders (markdown)

Risto Lahtela 2021-04-07 19:56:36 +03:00
parent 6cdadf5251
commit 0726a8c511
1 changed files with 9 additions and 0 deletions

@ -31,6 +31,14 @@ return builder.addValue(Long.class,
);
```
You can add multiple values to a single builder.
```java
ExtensionDataBuilder builder = newExtensionDataBuilder();
return builder.addValue(Long.class, builder.valueBuilder("Steps taken").buildNumber(53298L))
.addValue(String.class, builder.valueBuilder("Taken in").buildNumber("World Name"))
;
```
Here are the types and build methods that are available:
```java
builder.addValue(Boolean.class, builder.valueBuilder("Example").buildBoolean(false));
@ -58,6 +66,7 @@ In addition to this value builder has a lot of other methods:
```
builder.valueBuilder("Example") // 50 char limit
.description("Describes what Example is about") // 150 char limit
.priority(0) // ordering priority, highest value is placed top most on the page
.icon("gavel", Family.SOLID, Color.RED) // https://fontawesome.com/icons
.icon(Icon.called("gavel").of(Family.SOLID).of(Color.RED).build()) // https://fontawesome.com/icons
.showInPlayerTable()