pub.oysters.defs

oysters.pub

Documentation

actorView object

An account, hydrated enough to render a byline without resolving the DID.

Properties

avatar string uri Optional

URL of the account's avatar image.

did string did Required

The account's DID, which is its permanent identity.

displayName string Optional

A chosen name, if the account has one.

maxLength: 256 bytesmaxGraphemes: 64 graphemes
handle string handle Optional

The handle the DID document claims, as last seen. Absent until we have resolved one.

View raw schema
{
  "type": "object",
  "required": [
    "did"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The account's DID, which is its permanent identity."
    },
    "avatar": {
      "type": "string",
      "format": "uri",
      "description": "URL of the account's avatar image."
    },
    "handle": {
      "type": "string",
      "format": "handle",
      "description": "The handle the DID document claims, as last seen. Absent until we have resolved one."
    },
    "displayName": {
      "type": "string",
      "maxLength": 256,
      "description": "A chosen name, if the account has one.",
      "maxGraphemes": 64
    }
  },
  "description": "An account, hydrated enough to render a byline without resolving the DID."
}
commentView object

One comment in a discussion.

Properties

cid string cid Optional

CID of the exact revision indexed.

indexedAt string datetime Required

When this board first saw the record.

record unknown Required

The pub.oysters.comment record, rebuilt from the indexed fields. See postView.record.

upvoteCount integer Optional

Live upvotes on this comment.

minimum: 0
uri string at-uri Required

The comment's AT-URI.

View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "author",
    "record",
    "indexedAt"
  ],
  "properties": {
    "cid": {
      "type": "string",
      "format": "cid",
      "description": "CID of the exact revision indexed."
    },
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "The comment's AT-URI."
    },
    "author": {
      "ref": "#actorView",
      "type": "ref",
      "description": "Who wrote it."
    },
    "record": {
      "type": "unknown",
      "description": "The pub.oysters.comment record, rebuilt from the indexed fields. See postView.record."
    },
    "indexedAt": {
      "type": "string",
      "format": "datetime",
      "description": "When this board first saw the record."
    },
    "upvoteCount": {
      "type": "integer",
      "minimum": 0,
      "description": "Live upvotes on this comment."
    }
  },
  "description": "One comment in a discussion."
}
postView object

A submission with everything needed to render it: the record as written, its author, and the counts this board derived.

Properties

author ref #actorView Required

Who submitted it.

cid string cid Optional

CID of the exact revision indexed. Absent for a record indexed before its CID was known.

commentCount integer Optional

Live comments, at any depth.

minimum: 0
indexedAt string datetime Required

When this board first saw the record. Ranking uses this rather than the record's own createdAt, which its author chose.

record unknown Required

The pub.oysters.post record, rebuilt from the indexed fields. Fields this board does not index are not echoed; fetch the record from the author's repository if you need it byte-for-byte.

tags array of string Optional

Tags from this board's curated vocabulary. The record may claim others; those are not echoed here.

upvoteCount integer Optional

Live upvotes. Not the ranking score, which is deliberately not exposed.

minimum: 0
uri string at-uri Required

The submission's AT-URI. This is the stable identifier; do not key on anything else.

View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "author",
    "record",
    "indexedAt"
  ],
  "properties": {
    "cid": {
      "type": "string",
      "format": "cid",
      "description": "CID of the exact revision indexed. Absent for a record indexed before its CID was known."
    },
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "The submission's AT-URI. This is the stable identifier; do not key on anything else."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 128
      },
      "description": "Tags from this board's curated vocabulary. The record may claim others; those are not echoed here."
    },
    "author": {
      "ref": "#actorView",
      "type": "ref",
      "description": "Who submitted it."
    },
    "record": {
      "type": "unknown",
      "description": "The pub.oysters.post record, rebuilt from the indexed fields. Fields this board does not index are not echoed; fetch the record from the author's repository if you need it byte-for-byte."
    },
    "indexedAt": {
      "type": "string",
      "format": "datetime",
      "description": "When this board first saw the record. Ranking uses this rather than the record's own createdAt, which its author chose."
    },
    "upvoteCount": {
      "type": "integer",
      "minimum": 0,
      "description": "Live upvotes. Not the ranking score, which is deliberately not exposed."
    },
    "commentCount": {
      "type": "integer",
      "minimum": 0,
      "description": "Live comments, at any depth."
    }
  },
  "description": "A submission with everything needed to render it: the record as written, its author, and the counts this board derived."
}
tagView object

One tag in the board's curated vocabulary.

Properties

description string Optional

What the tag is for.

maxLength: 1024 bytes
name string Required

The tag's display name.

maxLength: 256 bytes
slug string Required

The tag as it appears in a record and in /t/ URLs.

maxLength: 128 bytes
View raw schema
{
  "type": "object",
  "required": [
    "slug",
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 256,
      "description": "The tag's display name."
    },
    "slug": {
      "type": "string",
      "maxLength": 128,
      "description": "The tag as it appears in a record and in /t/ URLs."
    },
    "description": {
      "type": "string",
      "maxLength": 1024,
      "description": "What the tag is for."
    }
  },
  "description": "One tag in the board's curated vocabulary."
}
threadViewComment object

A comment and its replies, nested. Replies are ordered the way the board displays them: by weighted score, ties broken by age.

Properties

comment ref #commentView Required

The comment at this node.

replies array of ref#threadViewComment Optional

Direct replies, each with their own replies. Empty at the depth limit rather than absent, so a client can tell a leaf from a truncation only by comparing against the depth it asked for.

View raw schema
{
  "type": "object",
  "required": [
    "comment"
  ],
  "properties": {
    "comment": {
      "ref": "#commentView",
      "type": "ref",
      "description": "The comment at this node."
    },
    "replies": {
      "type": "array",
      "items": {
        "ref": "#threadViewComment",
        "type": "ref"
      },
      "description": "Direct replies, each with their own replies. Empty at the depth limit rather than absent, so a client can tell a leaf from a truncation only by comparing against the depth it asked for."
    }
  },
  "description": "A comment and its replies, nested. Replies are ordered the way the board displays them: by weighted score, ties broken by age."
}
threadViewPost object

A submission and its whole discussion.

Properties

post ref #postView Required

The submission the discussion is about.

replies array of ref#threadViewComment Optional

Top-level comments, each with their own replies.

View raw schema
{
  "type": "object",
  "required": [
    "post"
  ],
  "properties": {
    "post": {
      "ref": "#postView",
      "type": "ref",
      "description": "The submission the discussion is about."
    },
    "replies": {
      "type": "array",
      "items": {
        "ref": "#threadViewComment",
        "type": "ref"
      },
      "description": "Top-level comments, each with their own replies."
    }
  },
  "description": "A submission and its whole discussion."
}

Lexicon Garden

@