gobengo / activitystreams2-spec-scraped

ActivityStreams 2.0 vocabulary in machine-readable form, scraped using TypeScript + cheerio
Apache License 2.0
9 stars 1 forks source link

Parse examples of Activity Types #2

Closed gobengo closed 6 years ago

gobengo commented 6 years ago

e.g.

{
  "name": "Question",
  "notes": "Represents a question being asked. Question objects are an extension of IntransitiveActivity. That is, the Question object is an Activity, but the direct object is the question itself and therefore it would not contain an object property. Either of the anyOf and oneOf properties MAY be used to express possible answers, but a Question object MUST NOT have both properties.",
  "subClassOf": {
    "name": "IntransitiveActivity",
    "href": "https://www.w3.org/TR/activitystreams-vocabulary/#dfn-intransitiveactivity"
  },
  "uri": "https://www.w3.org/ns/activitystreams#Question",
  "example": [
    {
      "name": "Example 40",
      "uri": "https://www.w3.org/TR/activitystreams-vocabulary/#ex55a-jsonld",
      "object": {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Question",
        "name": "What is the answer?",
        "oneOf": [
          {
            "type": "Note",
            "name": "Option A"
          },
          {
            "type": "Note",
            "name": "Option B"
          }
        ]
      }
    },
    {
      "name": "Example 41",
      "uri": "https://www.w3.org/TR/activitystreams-vocabulary/#ex55b-jsonld",
      "object": {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Question",
        "name": "What is the answer?",
        "closed": "2016-05-10T00:00:00Z"
      }
    }
  ]
}