aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyapd/objects.py33
1 files changed, 31 insertions, 2 deletions
diff --git a/pyapd/objects.py b/pyapd/objects.py
index 19aa65f..4a97200 100644
--- a/pyapd/objects.py
+++ b/pyapd/objects.py
@@ -5,13 +5,42 @@ class ActivityObject():
PROPERTIES = [
'id',
'type',
+ 'attachment',
+ 'attributedTo',
+ 'audience',
+ 'content',
+ 'context',
+ 'contentMap',
+ 'name',
+ 'nameMap',
+ 'endTime',
+ 'generator',
+ 'icon',
+ 'image',
+ 'inReplyTo',
+ 'location',
+ 'preview',
+ 'published',
+ 'replies',
+ 'startTime',
+ 'summary',
+ 'summaryMap',
+ 'tag',
+ 'updated',
+ 'url',
+ 'to',
+ 'bto',
+ 'cc',
+ 'bcc',
+ 'mediaType',
+ 'duration',
]
def __init__(self, *args, **kw):
self.context = "https://www.w3.org/ns/activitystreams"
for p in self.PROPERTIES:
if p in kw:
- setattr(self, p, kw[p])
+ setattr(self, "ap_"+p, kw[p])
@classmethod
def from_jsons(cls, data: str):
@@ -20,7 +49,7 @@ class ActivityObject():
def to_jsonable(self):
data = {}
for p in self.PROPERTIES:
- v = getattr(self, p, None)
+ v = getattr(self, "ap_"+p, None)
if v is not None:
data[p] = v
return data