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

CONTENTS

NAME

MightyNetwork::Doc::ActivityPub::Activity

DESCRIPTION

ActivityPub objects representing actions made by an actor.

TYPE

Activities have a type, like Create, Follow, Accept, Undo

See https://www.w3.org/TR/activitystreams-vocabulary/#h-activity-types for the available types.

ACTOR

Activity’s actor refer to the actor who makes the action.

OBJECT

Activity’s object refer to the object that is the subject of the action.

Some well-known objects: Article (used by Plume), Audio (used by Funkwhale), Note (used by Mastodon), Video (used by PeerTube).

See https://www.w3.org/TR/activitystreams-vocabulary/#h-object-types for available objects.

SUMMARY

An activity is the description of an action: actor do type to an object.

Example: https://example.org/users/narf Create a Note.

JSON-LD REPRESENTATION

For our example above, the activity would be like this.

{
    "@context" : "https://www.w3.org/ns/activitystreams",
    "id" : "https://example.org/users/narf/note/5b44c2974a67a67eec472d82/activity",
    "type" : "Create",
    "actor" : "https://example.org/users/narf",
    "object": {
        "type": "Note",
        "id" : "https://example.org/users/narf/note/5b44c2974a67a67eec472d82",
        "to" : [ "https://www.w3.org/ns/activitystreams#Public" ],
        "cc" : [ "https://example.org/users/narf/followers" ],
        "attributedTo":"https://example.org/users/narf",
        "content": "Hello world !",
        "published":"2018-07-10T14:28:39.889Z",
    },
    "published" : "2018-07-10T14:28:39.889Z"
}

REFERENCE

This is the class hierarchy of MightyNetwork::Doc::ActivityPub::Activity.

Those are some examples of activities.

MightyNetwork::Doc::ActivityPub::Activity::Announce
MightyNetwork::Doc::ActivityPub::Activity::Create
MightyNetwork::Doc::ActivityPub::Activity::Delete

SEE ALSO

MightyNetwork::Doc, MightyNetwork::Doc::ActivityPub, MightyNetwork::Doc::ActivityPub::Actor, MightyNetwork::Doc::ActivityPub::Inbox, object, MightyNetwork::Doc::ActivityPub::Note, https://www.w3.org/TR/activitystreams-vocabulary/#h-activity-types, https://www.w3.org/TR/activitystreams-vocabulary/#h-object-types