PicsGallery pics.gallery@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
media-hub
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/pics/gallery.v1.json

Public, active, explicitly listed pictures; first 30 per page. Opaque next cursor is null at the end. Popular orders likes then views; Rising orders likes in the last day; New orders publication time.

Fields

FieldTypeRequiredDescriptionConstraints
picturespics.pictureyes
  • maxItems 30
nextstring | nullyes
sortenumyes
  • one of "popular", "new", "rising"

Examples

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

Valid: basic
{
  "pictures": [
    {
      "id": "pic_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "slug": "Abcdef23",
      "title": "Forest",
      "width": 800,
      "height": 600,
      "listed": true,
      "tags": [
        "forest"
      ],
      "links": {
        "page": "https://openvibe.pics/i/Abcdef23",
        "direct": "https://openvibe.pics/i/Abcdef23",
        "thumb": "https://openvibe.pics/i/Abcdef23",
        "markdown": "https://openvibe.pics/i/Abcdef23",
        "html": "https://openvibe.pics/i/Abcdef23",
        "bbcode": "https://openvibe.pics/i/Abcdef23"
      }
    }
  ],
  "next": null,
  "sort": "new"
}
Rejected: missing
{}

Validate

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