Skip to content

Instantly share code, notes, and snippets.

@ciberch
Created October 15, 2010 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ciberch/628479 to your computer and use it in GitHub Desktop.
Save ciberch/628479 to your computer and use it in GitHub Desktop.
JSON Activity Streams Example
{"items": [
{
"verb": "post", // Id which maps to specification submitted to activity streams registrar
"postedTime": "2010-12-12T12:12:12Z",
"title": "Plain Text",
"summary": "Plain Text", // Have not decided on plain text only
"permalinkUrl": "...",
"to": [{"id" : "acct:john.doe@example.org"}], // We should use person constructs here
"cc": [{"id":"acct:jane.doe@example.org"}],
"bcc": [{"id":"acct:jean.deux@example.org"}],
"body": "<p>Unescaped HTML Markup</p>",
"icon": { // i've also seen "icon":"http://example.org/foo.jpg" in some examples, so not sure which is correct //
"url": "http://example.org/foo.jpg",
"width": "123", // optional
"height": "123", // optional
"duration": "1234" //optional
},
"image": { // i've also seen "image":"http://example.org/foo.jpg" in some examples //
"url": "http://example.org/foo2.jpg",
"width": "123",
"height": "123",
"duration": "1234"
}
"actor": {
"objectType":"person",
"link":"http://example.org/people/john.doe"
"id":"john.doe"
},
"object": {
"id": "foo",
"displayName": "Foo",
"summary": "Plain Text",
"permalinkUrl": "http://example.org/stuff/object",
"objectType": "album", // i've seen this as an array in some examples, e.g. "objectType":["album"]
"image": { "url":"...","width":"...","height":"...","width":"...", ... },
"inReplyTo": { "id":"...", "objectType":"activity", "link":"...", ... },
"replies": [ {"id":"...", "objectType":"...", ...} ],
"reactions": [ { ???? } ], // not sure about this one
"attachedObjects": [ { "objectType":"...","id":"...",... } ],
"upstreamDuplicates": [ "id1", "id2", "id3" ],
"downstreamDuplicates": [ "id1", "id2", "id3" ],
"standardLinks": {
"alternate": [
{"href": ""},
{"href": ""}
],
"enclosure": [
{"href":""},
{"href":""}
]
}
},
"target": {
"id":"...",
"objectType":"...",
"permalinkUrl":"..."
},
"generator": {
"id":"...",
"objectType":"...",
"permalinkUrl":"..."
},
"provider": {
"id":"...",
"objectType":"...",
"permalinkUrl":"..."
},
"standardLinks": {
"alternate": [
{"href": ""},
{"href": ""}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment