Bulletin client addition.
This commit is contained in:
@@ -11,6 +11,13 @@ class BulletinWrapper:
|
|||||||
raise ValueError("Was not given a bulletin dictionary.")
|
raise ValueError("Was not given a bulletin dictionary.")
|
||||||
self.data = data
|
self.data = data
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return f"<Bulletin {self.id} - {self.author}>"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def id(self) -> int:
|
||||||
|
return self.data['id']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def created(self) -> datetime.datetime:
|
def created(self) -> datetime.datetime:
|
||||||
return datetime.datetime.fromisoformat(self.data['created_at'])
|
return datetime.datetime.fromisoformat(self.data['created_at'])
|
||||||
|
|||||||
Reference in New Issue
Block a user