PlayResultRequest play.result-request@1

Generated at from openvibe-contracts v0.177.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
play
Visibility
public
Status
active
Compatibility
backward
Decision
Games ADR-0007
Schema
https://openvibe.network/contracts/play/result-request.v1.json

What a title's principal posts about its players (play.result.write): a round's scores to a board (POST …/scores; idempotent by ref), achievements a player unlocked (POST …/unlocks), or the person a guest became (POST …/players/:guest/adopt).

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: basic
{
  "board": "best",
  "ref": "round-1",
  "entries": [
    {
      "player": "usr_01JABCDEFGHJKMNPQRSTVWXYZ0",
      "name": "Ada",
      "score": 450
    },
    {
      "player": "guest:a1b2c3d4e5f6",
      "name": "Guest 7",
      "score": 300
    }
  ]
}
Rejected: basic
{
  "board": "best",
  "ref": "round-1",
  "entries": [
    {
      "player": "bob",
      "name": "Bob",
      "score": 1
    }
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('play.result-request@1', value);   // { valid, errors: [{ path, message }] }