MilanoteUnofficialApi.elements.commentthread
1from .comment import Comment 2from .element import Element 3from .location import Location 4from .meta import Meta 5 6 7class CommentThread(Element): 8 """ 9 A Milanote element that contains comments. 10 """ 11 12 id: str 13 """ID of the element.""" 14 element_type: str 15 """Type of the element.""" 16 meta: Meta 17 """Metadata of the element.""" 18 location: Location 19 """Location of the element.""" 20 comments: list[Comment] 21 """List of comments in the thread.""" 22 23 def __init__(self, data: dict, comments_data: list = None): 24 super().__init__(data) 25 if comments_data is not None: 26 self.comments = [Comment(comment) for comment in comments_data] 27 28 def __repr__(self): 29 return f"CommentThread(id='{self.id}')"
8class CommentThread(Element): 9 """ 10 A Milanote element that contains comments. 11 """ 12 13 id: str 14 """ID of the element.""" 15 element_type: str 16 """Type of the element.""" 17 meta: Meta 18 """Metadata of the element.""" 19 location: Location 20 """Location of the element.""" 21 comments: list[Comment] 22 """List of comments in the thread.""" 23 24 def __init__(self, data: dict, comments_data: list = None): 25 super().__init__(data) 26 if comments_data is not None: 27 self.comments = [Comment(comment) for comment in comments_data] 28 29 def __repr__(self): 30 return f"CommentThread(id='{self.id}')"
A Milanote element that contains comments.