CommunityFeedAnswer community.feed-answer@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/feed-answer.v1.json
community.feed-answer@1: the response from GET /api/v1/feed.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
items | community.feed-card | yes | ||
next_cursor | string | null | yes |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: page
{
"items": [
{
"id": "p:42",
"kind": "post",
"url": "https://openvibe.community/p/42",
"title": "A post",
"text": "Hello",
"at": null,
"site": "community",
"site_name": "Community",
"actor": null,
"media": null,
"counts": {}
}
],
"next_cursor": null
}Rejected: missing-cursor
{
"items": []
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.feed-answer@1', value); // { valid, errors: [{ path, message }] }