Comment
Implements the Comment class.
Comment(lemmy, comment, community=None, post=None)
A class for Comments.
Initialize a Comment instance.
Parameters:
-
lemmy(Lemmy) –A Lemmy instance.
-
comment(CommentView) –A CommentView.
-
community(Optional[Community], default:None) –The Community in which this was posted.
-
post(Optional[Post], default:None) –The Post under which this comment was posted.
Source code in pylemmy/models/comment.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
community: pylemmy.models.community.Community
property
The Community in which this was posted.
post: pylemmy.models.post.Post
property
The Post under which this comment was posted.
create_report(reason)
Report this comment.
Parameters:
-
reason(str) –A reason for the report.
Source code in pylemmy/models/comment.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
CommentReport(lemmy, report, comment=None)
A class for Comment reports.
Initialize a Comment instance.
Parameters:
-
lemmy(Lemmy) –A Lemmy instance.
-
report(CommentReportView) – -
comment(Optional[Comment], default:None) –The comment being reported.
Source code in pylemmy/models/comment.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | |
resolve(*, resolved)
Resolve a comment report.
Parameters:
-
resolved(bool) –Either resolve or unresolve the report.
Source code in pylemmy/models/comment.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |