From 368738831c88ada98ac87abc173d49ba775c74a3 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Mon, 26 Jun 2023 15:50:30 +0200 Subject: [PATCH] Add Notification and Report entities --- toot/entities.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/toot/entities.py b/toot/entities.py index c1a49b7..16afc80 100644 --- a/toot/entities.py +++ b/toot/entities.py @@ -247,6 +247,36 @@ class Status: return self.reblog or self +@dataclass +class Report: + """ + https://docs.joinmastodon.org/entities/Report/ + """ + id: str + action_taken: bool + action_taken_at: Optional[datetime] + category: str + comment: str + forwarded: bool + created_at: datetime + status_ids: Optional[List[str]] + rule_ids: Optional[List[str]] + target_account: Account + + +@dataclass +class Notification: + """ + https://docs.joinmastodon.org/entities/Notification/ + """ + id: str + type: str + created_at: datetime + account: Account + status: Optional[Status] + report: Optional[Report] + + # Generic data class instance T = TypeVar("T")