MightyNetwork::Doc::ActivityPub::Activity
ActivityPub objects representing actions made by an actor.
Activities have a type
, like Create
, Follow
, Accept
, Undo
…
See https://www.w3.org/TR/activitystreams-vocabulary/#h-activity-types for the available types.
Activity’s actor
refer to the actor who makes the action.
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.
An activity is the description of an action: actor do type to an object.
Example: https://example.org/users/narf Create a Note.
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"
}
This is the class hierarchy of MightyNetwork::Doc::ActivityPub::Activity.
Those are some examples of activities.
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