CommunityPulseContributeRequest community.pulse-contribute-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- community
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/community/pulse-contribute-request.v1.json
An app with a person's community.pulse.contribute grant posts an item about that person. The app token supplies the person and app identity; the body cannot choose either.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
text | string | yes |
| |
url | string | yes |
| |
picture_url | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: picture
{
"id": "demo-2",
"text": "A new demo",
"url": "https://example.test/demo",
"picture_url": "https://openvibe.media/t/demo.jpg"
}Valid: text
{
"id": "launch-1",
"text": "A new demo",
"url": "https://example.test/demo"
}Rejected: external-picture
{
"id": "demo-2",
"text": "A new demo",
"url": "https://example.test/demo",
"picture_url": "https://example.test/demo.jpg"
}Rejected: http
{
"id": "launch-1",
"text": "A new demo",
"url": "http://example.test/demo"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.pulse-contribute-request@1', value); // { valid, errors: [{ path, message }] }