LiveAvatarWriteResult live.avatar-write-result@1
Generated at from
openvibe-contracts v0.79.0 and
openvibe-sdk v0.25.0.
- Version
- 1.0.0
- Owner
- live
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/live/avatar-write-result.v1.json
live.avatar-write-result@1: the answer of POST /internal/user-avatar on OpenVibe.Live: { ok: true, id, changed } — id is the Live user the picture was stored on and changed is false when it already matched. Refusals are { ok: false, error } (400, 404, 422, 500).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
ok | const | yes |
| |
id | integer | yes |
| |
changed | boolean | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: stored
{
"ok": true,
"id": 77,
"changed": true
}Rejected: no-id
{
"ok": true,
"changed": false
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('live.avatar-write-result@1', value); // { valid, errors: [{ path, message }] }