Updated APIv5 DataExtension API (markdown)

Risto Lahtela 2019-08-27 13:01:40 +03:00
parent d910fdce1a
commit ff239e7c90

@ -451,23 +451,19 @@ These annotations can be used to add information structures. They might have dif
### `@GroupProvider` ### `@GroupProvider`
> `@GroupProvider` will be included in a future update for DataExtension API. **Speciality:** Multiple `Group`s the player is in. Any providers with `Group` parameter will be called with the groups that this method provides (Not implemented yet).
**Speciality:** Multiple `Group`s the player is in. Any providers with `Group` parameter will be called with the groups that this method provides. - Requires `DATA_EXTENSION_GROUPS` capability
<details> <details>
<summary>Limitations and Additional data</summary> <summary>Limitations and Additional data</summary>
- There can only be one GroupProvider per DataExtension - If you need multiple kinds of groups, create another `DataExtension` class.
- Method requires UUID or String as method parameter. - Method requires UUID or String as method parameter.
- Does not work with `@Tab` annotations - Group names over 50 characters will be truncated
Plan will construct following from given group data: Plan will construct following from given group data:
- Players in different groups are counted - Players in different groups are counted
- Additional data given by `Group` parameter methods about each group.
- Additional data about players is grouped based on groups.
- Additional data is displayed under a dropdown of the group.
</details> </details>
<details> <details>
@ -475,29 +471,26 @@ Plan will construct following from given group data:
``` ```
@GroupProvider( @GroupProvider(
text* = "Jobs", text = "Jobs",
description = "What jobs the player has", groupColor = Color.NONE
priority = 5,
iconName = "question", iconName = "question",
iconFamily = Family.SOLID, iconFamily = Family.SOLID,
iconColor = Color.NONE
) )
public String[] playerJobs(UUID playerUUID) {...} public String[] playerJobs(UUID playerUUID) {
return new String[]{"Mason", "Woodcutter"}
}
``` ```
- `text` - Text that appears next to the value on Player's page, for example "Jobs: None" - `text` - Text that appears next to the value, for example "Jobs: None"
- `description` - Text that appears when hovering over the value - `groupColor` - Color of the icon or table that appears near the groups
- `priority` - Ordering number, highest value is placed top most
- `iconName` - Icon names can be found from https://fontawesome.com/icons?d=gallery&m=free - `iconName` - Icon names can be found from https://fontawesome.com/icons?d=gallery&m=free
- `iconFamily` - Icon family should match details on the site above - `iconFamily` - Icon family should match details on the site above
- `iconColor` - Color of the icon that appears next to the value
</details> </details>
### `@TableProvider` ### `@TableProvider`
> `@TableProvider` will be included in the second update for DataExtension API.
**Speciality:** Table structures. **Speciality:** Table structures.
- Requires `DATA_EXTENSION_TABLES` capability - Requires `DATA_EXTENSION_TABLES` capability