JSR

Built and signed on GitHub Actions

Works with

This package works with Cloudflare Workers, Node.js, Deno, Bun

This package works with Cloudflare Workers

This package works with Node.js

This package works with Deno

This package works with Bun

JSR Score100%

License

MIT

Downloads198/wk

Published5 days ago (2.3.6)

Vocabularies library for Fedify

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 inclusiveOptions and exclusiveOptions properties may be used to express possible answers, but a Question object must not have both properties.

Constructors

Constructs a new instance of Question with the given values.

Parameters

The values to initialize the instance with.

The options to use for initialization.

Static Properties

The type URI of Question: https://www.w3.org/ns/activitystreams#Question.

Static Methods

Converts a JSON-LD structure to an object of this type.

Properties

Indicates that a question has been closed, and answers are no longer accepted.

Similar to Question.getExclusiveOptions, but returns their @ids instead of the objects themselves.

Similar to Question.getInclusiveOptions, but returns their @ids instead of the objects themselves.

Similar to Question.getQuoteAuthorization, but returns its @id URL instead of the object itself.

Similar to Question.getQuote, but returns its @id URL instead of the object itself.

How many people have voted in the poll. Distinct from how many votes have been cast (in the case of multiple-choice polls).

Methods

Clones this instance, optionally updating it with the given values.

Identifies an exclusive option for a Question. Use of exclusiveOptions implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use inclusiveOptions.

Identifies an inclusive option for a Question. Use of inclusiveOptions implies that the Question can have multiple answers. To indicate that a Question can have only one answer, use exclusiveOptions.

The quoted ActivityStreams object.

This property is serialized as an IRI-valued JSON-LD property.

A QuoteAuthorization object that proves this quote was approved by the quoted object's author.

Converts this object to a JSON-LD structure.

Read the original on jsr.io ↗