NetworkLevelBoard network.level-board@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/network/level-board.v1.json
NetworkLevelBoard: one earned platform level owned by Network; experience is never bought or spent.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
all_time | object | yes |
| |
all_time.top | array of object | yes |
| |
all_time.top[].subject | string | yes |
| |
all_time.top[].username | string | yes | ||
all_time.top[].level | integer | yes |
| |
all_time.top[].xp | integer | yes |
| |
all_time.top[].rank | integer | yes |
| |
all_time.me | one of | yes | ||
all_time.around | array of object | yes |
| |
all_time.around[].subject | string | yes |
| |
all_time.around[].username | string | yes | ||
all_time.around[].level | integer | yes |
| |
all_time.around[].xp | integer | yes |
| |
all_time.around[].rank | integer | yes |
| |
week | object | yes |
| |
week.top | array of object | yes |
| |
week.top[].subject | string | yes |
| |
week.top[].username | string | yes | ||
week.top[].level | integer | yes |
| |
week.top[].xp | integer | yes |
| |
week.top[].rank | integer | yes |
| |
week.me | one of | yes | ||
week.around | array of object | yes |
| |
week.around[].subject | string | yes |
| |
week.around[].username | string | yes | ||
week.around[].level | integer | yes |
| |
week.around[].xp | integer | yes |
| |
week.around[].rank | integer | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"all_time": {
"top": [],
"me": null,
"around": []
},
"week": {
"top": [],
"me": null,
"around": []
}
}Rejected: example
{}Validate
const contracts = require('openvibe-contracts');
contracts.validate('network.level-board@1', value); // { valid, errors: [{ path, message }] }