bookwyrm-mastodon/bookwyrm/activitypub/image.py

21 lines
357 B
Python
Raw Normal View History

2021-03-08 11:49:10 -05:00
""" an image, nothing fancy """
2020-11-27 20:58:21 -05:00
from dataclasses import dataclass
2020-11-27 23:11:22 -05:00
from .base_activity import ActivityObject
2020-11-27 20:58:21 -05:00
2021-03-08 11:49:10 -05:00
2020-11-27 23:11:22 -05:00
@dataclass(init=False)
2021-04-15 19:35:04 -04:00
class Document(ActivityObject):
2021-04-26 12:15:42 -04:00
"""a document"""
2021-03-08 11:49:10 -05:00
2020-11-27 20:58:21 -05:00
url: str
2021-03-08 11:49:10 -05:00
name: str = ""
2021-03-15 16:55:48 -04:00
type: str = "Document"
id: str = None
2021-04-17 14:47:48 -04:00
2021-04-17 14:57:06 -04:00
2021-04-17 14:47:48 -04:00
@dataclass(init=False)
class Image(Document):
2021-04-26 12:15:42 -04:00
"""an image"""
2021-04-17 14:57:06 -04:00
2021-04-17 14:47:48 -04:00
type: str = "Image"