Skip to content

Commit

Permalink
as2: add Event
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Sep 23, 2017
1 parent b7b34d0 commit eb93713
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions granary/as2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def _invert(d):
'comment': 'Note',
'person': 'Person',
'place': 'Place',
'event': 'Event',
}
TYPE_TO_OBJECT_TYPE = _invert(OBJECT_TYPE_TO_TYPE)

Expand Down
16 changes: 16 additions & 0 deletions granary/test/testdata/event.as2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"@type": "Event",
"@id": "tag:example.com,2011:event-xyz",
"url": "http://example.com/event-xyz",
"displayName": "XYZ",
"summary": "it's happening!",
"content": "this event is gonna be great",
"published": "2017-01-22T01:29:15+00:00",
"startTime": "2017-07-12 17:30",
"endTime": "2017-07-12 19:30",
"location": {
"@type": "Place",
"displayName": "the place"
}
}

0 comments on commit eb93713

Please sign in to comment.