MightyNetwork :: Doc :: ActivityPub :: Collection (source, CPAN)

CONTENTS

NAME

MightyNetwork::Doc::ActivityPub::Collection

DESCRIPTION

Federated object of Collection type.

It’s a list of other objects: actors, notes… Collections can be paged and so may not contain items but indicates where to find the CollectionPage objects that contains the items.

Inherits all properties from the Object type.

See https://www.w3.org/TR/activitystreams-core/#collection for details.

JSON-LD REPRESENTATION

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/security/v1"
    ],
    "id": "https://thisinstance.org/users/narf/followers",
    "type": "Collection",
    "totalItems": 3,
    "items": [
        "https://anotherinstance.org/users/ren",
        "https://yetanotherinstance.social/users/pierre",
        "https://thisinstance.org/users/nathalie"
    ]
}

As this object is federated, it needs a type (Collection, obviously) and an id.

ORDEREDCOLLECTION

An OrderedCollection is a subtype of Collection in which members of the logical collection are assumed to always be strictly ordered. It inherits all properties from Collection but use orderedItems instead of items.

PROPERTIES

totalItems

Total number of items in the Collection.

items / orderedItems

Items in the Collection.

first

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

last

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

current

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

SEE ALSO

MightyNetwork::Doc, MightyNetwork::Doc::ActivityPub, MightyNetwork::Doc::Glossary