Post
Implements the Post class.
Post(lemmy, post, community=None)
A class for Posts.
Initialize a Post instance.
Parameters:
-
lemmy(Lemmy) –A Lemmy instance.
-
post(PostView) –A PostView.
-
community(Optional[Community], default:None) –The Community in which this was posted.
Source code in pylemmy/models/post.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
community: pylemmy.models.community.Community
property
The Community in which this Post was posted.
create_comment(content, **kwargs)
Create a new Comment under this Post.
Parameters:
-
content(str) –Content of the comment.
-
kwargs–See optional arguments in CreateComment.
Source code in pylemmy/models/post.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
create_report(reason)
Report this post.
Parameters:
-
reason(str) –A reason for the report.
Source code in pylemmy/models/post.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
get_comments(**kwargs)
Get Comments under this Post.
Parameters:
-
kwargs–See optional arguments in GetComments.
Source code in pylemmy/models/post.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
PostReport(lemmy, report, post=None)
A class for Post reports.
Initialize a Post instance.
Parameters:
-
lemmy(Lemmy) –A Lemmy instance.
-
report(PostReportView) – -
post(Optional[Post], default:None) –The post being reported.
Source code in pylemmy/models/post.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
resolve(*, resolved)
Resolve a post report.
Parameters:
-
resolved(bool) –Either resolve or unresolve the report.
Source code in pylemmy/models/post.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |