VideoPlaylistReadRequest video.playlist-read-request@1

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

Version
1.0.0
Owner
media-hub
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/video/playlist-read-request.v1.json

video.playlist-read-request@1: video.playlist.read takes no body. GET /api/v1/video/playlists (the caller's own), GET /api/v1/video/playlists/:id (the owner sees a private one; anyone a public or unlisted one; otherwise 404 playlist.not_found, never 403) and the open GET /api/v1/video/users/:username/playlists, whose query is { limit?, cursor? } (limit 1-50, default 20; cursor is the previous page's next_cursor; 404 user.not_found).

Fields

FieldTypeRequiredDescriptionConstraints
limitinteger
  • minimum 1
  • maximum 50
cursorstring
  • maxLength 400

Examples

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

Valid: none
{}
Valid: page
{
  "limit": 20,
  "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNiJ9"
}
Rejected: limit-too-big
{
  "limit": 51
}

Validate

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