-
Notifications
You must be signed in to change notification settings - Fork 2
Sample ActivityPub json snippets
qwazix edited this page Aug 13, 2019
·
10 revisions
{
"@context": [
"https://www.w3.org/ns/activitystreams",
{
"commentsEnabled": "sc:Boolean",
"sc": "http://schema.org#"
}
],
"type": "Create",
"id": "http://writefreely.xps/api/posts/3y2vettm5r",
"actor": "http://writefreely.xps/api/collections/qwazix",
"published": "2019-08-08T16:02:49.613334687Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"http://floorb.qwazix.com/actor/"
],
"object": {
"type": "Article",
"id": "http://writefreely.xps/api/posts/3y2vettm5r",
"published": "2019-08-08T16:02:49.613334687Z",
"inReplyTo": null,
"url": "http://writefreely.xps/this-is-post-number-3",
"attributedTo": "http://writefreely.xps/api/collections/qwazix",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"http://floorb.qwazix.com/actor/"
],
"name": "This is post number 3",
"content": "\\u003cp\\u003epost 3\\u003c/p\\u003e\n",
"contentMap": {
"en": "\\u003cp\\u003epost 3\\u003c/p\\u003e\n"
},
"tag": [],
"commentsEnabled": false
}
}
{
"id": "https://mastodon.social/users/qwazix/statuses/102565077202414254/activity",
"type": "Announce",
"actor": "https://mastodon.social/users/qwazix",
"published": "2019-08-05T15:27:58Z",
"to": [
"https://www.w3.org/ns/activitystreams#Public"
],
"cc": [
"https://cybre.space/users/tzo",
"https://mastodon.social/users/qwazix/followers"
],
"object": "https://cybre.space/users/tzo/statuses/102564367759300737",
"atomUri": "https://mastodon.social/users/qwazix/statuses/102565077202414254/activity"
}
This is what we (pherephone) send out when we want to follow a writefreely instance. It seems to work
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "http://floorb.qwazix.com/nuerList",
"object": "http://writefreely.xps/api/collections/qwazix",
"to": "http://writefreely.xps/api/collections/qwazix",
"type": "Follow"
}
which writefreely munches on and spits back like this (I don't know why)
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"actor": "http://floorb.qwazix.com/nuerList",
"object": "http://writefreely.xps/api/collections/qwazix",
"to": "http://writefreely.xps/api/collections/qwazix",
"type": "Follow"
}