JSR

A Collection is a subtype of Object that represents ordered or unordered sets of Object or Link instances.

Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type.

Constructors

Constructs a new instance of Collection with the given values.

Parameters

The values to initialize the instance with.

The options to use for initialization.

Static Properties

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

Static Methods

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

Properties

Similar to Collection.getCurrent, but returns its @id URL instead of the object itself.

Similar to Collection.getFirst, but returns its @id URL instead of the object itself.

Similar to Collection.getFollowersOf, but returns its @id URL instead of the object itself.

Similar to Collection.getFollowingOf, but returns its @id URL instead of the object itself.

Similar to Collection.getInboxOf, but returns its @id URL instead of the object itself.

Similar to Collection.getItems, but returns their @ids instead of the objects themselves.

Similar to Collection.getLast, but returns its @id URL instead of the object itself.

Similar to Collection.getLikedOf, but returns its @id URL instead of the object itself.

Similar to Collection.getLikesOf, but returns its @id URL instead of the object itself.

Similar to Collection.getOutboxOf, but returns its @id URL instead of the object itself.

A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.

Methods

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

In a paged Collection, indicates the page that contains the most recently updated member items.

In a paged Collection, indicates the furthest preceding page of items in the collection.

Defines an actor for which the collection is the value of the followers property.

Defines an actor for which the collection is the value of the following property.

Defines an actor for which the collection is the value of the inbox property.

Identifies the items contained in a collection. The items might be ordered or unordered.

In a paged Collection, indicates the furthest proceeding page of the collection.

Defines an actor for which the collection is the value of the liked property.

Defines an object for which the collection is the value of the likes property.

Defines an actor for which the collection is the value of the outbox property.

Converts this object to a JSON-LD structure.

Read the original on jsr.io ↗