Skip to content

Some polls

Example 1: one choice

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/PDf_2s8YxVmYL-oJ",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "<p>Question</p>",
    "endTime": "2026-04-12T10:53:32.724958Z",
    "id": "http://host.test/objects/eIiymYy2NszO-M1O",
    "oneOf": [
      {
        "name": "Answer 1",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      },
      {
        "name": "Answer 2",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      }
    ],
    "published": "2026-04-08T07:53:32Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Question",
    "updated": "2026-04-08T07:53:32.724969Z"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "<p>Question</p>",
  "endTime": "2026-04-12T10:53:32.724958Z",
  "id": "http://host.test/objects/eIiymYy2NszO-M1O",
  "oneOf": [
    {
      "name": "Answer 1",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    },
    {
      "name": "Answer 2",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    }
  ],
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Question",
  "updated": "2026-04-08T07:53:32.724969Z"
}

Example 2: multiple choices

Activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "actor": "http://host.test/some/actor",
  "cc": [],
  "id": "http://host.test/activities/fmXv397LM-A3rsIw",
  "object": {
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "anyOf": [
      {
        "name": "Answer 1",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      },
      {
        "name": "Answer 2",
        "replies": {
          "totalItems": 0,
          "type": "Collection"
        },
        "type": "Note"
      }
    ],
    "attributedTo": "http://host.test/some/actor",
    "cc": [],
    "content": "<p>Question</p>",
    "endTime": "2026-04-12T10:53:32.725082Z",
    "id": "http://host.test/objects/SttSD4XwTMq27tyT",
    "published": "2026-04-08T07:53:32Z",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://other.test/some/actor"
    ],
    "type": "Question",
    "updated": "2026-04-08T07:53:32.725089Z"
  },
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Create"
}
Object
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "anyOf": [
    {
      "name": "Answer 1",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    },
    {
      "name": "Answer 2",
      "replies": {
        "totalItems": 0,
        "type": "Collection"
      },
      "type": "Note"
    }
  ],
  "attributedTo": "http://host.test/some/actor",
  "cc": [],
  "content": "<p>Question</p>",
  "endTime": "2026-04-12T10:53:32.725082Z",
  "id": "http://host.test/objects/SttSD4XwTMq27tyT",
  "published": "2026-04-08T07:53:32Z",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://other.test/some/actor"
  ],
  "type": "Question",
  "updated": "2026-04-08T07:53:32.725089Z"
}