Add Notification and Report entities

This commit is contained in:
Ivan Habunek 2023-06-26 15:50:30 +02:00
parent 119c514ee9
commit 368738831c
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
1 changed files with 30 additions and 0 deletions

View File

@ -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")