redditwarp.models.comment
#
- class redditwarp.models.comment.Comment(d: Mapping[str, Any])[source]#
Bases:
DatamementoBase
- property submission: Submission#
Information related to the comment’s submission.
- class Me(d: Mapping[str, Any])[source]#
Bases:
object
- saved: bool#
Whether the current user has saved the comment.
Value false if there is no user context.
- reply_notifications: bool#
Whether an inbox message will be sent to you when the submission receives a new top-level comment.
Value true if you are not the author of the submission.
Value true if there is no user context.
- voted: int#
Value
1
if upvoted,0
if not voted on,-1
if downvoted.
- class Author(d: Mapping[str, Any])[source]#
Bases:
object
- class AuthorFlair(d: Mapping[str, Any])[source]#
Bases:
object
- template_uuid: str | None#
The author’s flair template UUID.
Value is null if no flair template is being used.
- text_mode: str#
Either
text
orrichtext
.
- text: str#
Flair text.
Check if the value is an empty string to tell if a flair is being used.
- css_class: str#
The author’s flair CSS class.
When a flair template is being used, the value of this field will be that of the CSS class designated by the template. If the flair template does not specify a CSS class then the value will be an empty string.
- bg_color: str#
A background color hex string. E.g.,
#46d160
.If a flair template is not being used then the value is an empty string.
If a flair template is being used and the background color is unset then the value is an empty string.
- fg_color_scheme: str#
Either
dark
orlight
, or empty string.Value is empty string if a flair template is not being used.
- has_had_flair_assigned_before_in_subreddit: bool#
Because of quirks in the API, we can tell if the user has ever had a flair assigned before in the subreddit.
- has_had_flair_css_class_assigned_before_in_subreddit_when_no_flair_template_assigned: bool#
Because of quirks in the API, we can tell if the user has ever had a flair CSS class assigned before in the subreddit. This only works if a flair template is not being used.
- name: str#
- id36: str#
- idn: int#
- id: int#
- flair: AuthorFlair#
Attributes related to the author’s flair.
- class Submission(d: Mapping[str, Any])[source]#
Bases:
object
- id36: str#
- idn: int#
- id: int#
- archived: bool#
Whether the post is archived.
Archived posts cannot be commented on, but the author can still edit the OP.
- class Subreddit(d: Mapping[str, Any])[source]#
Bases:
object
- id36: str#
- idn: int#
- id: int#
- name: str#
- openness: str#
One of:
public
,private
,restricted
,archived
,employees_only
,gold_only
,gold_restricted
, oruser
.
- class Moderation(d: Mapping[str, Any])[source]#
Bases:
object
- class Approved(d: Mapping[str, Any])[source]#
Bases:
object
- by: str#
Name of the moderator who approved this comment.
- ut: int#
- at: datetime#
- class Removed(d: Mapping[str, Any])[source]#
Bases:
object
- by: str#
Name of the moderator who removed this comment.
- ut: int#
- at: datetime#
- class Reports(d: Mapping[str, Any])[source]#
Bases:
object
- ignoring: bool#
- num_reports: int#
- user_reports: Sequence[UserReport]#
- spam: bool#
- removal_reason: RemovalReason | None#
- id36: str#
ID of the comment as a base 36 number.
- idn: int#
- id: int#
- created_ut: int#
Unix timestamp of when the comment was made.
- created_at: datetime#
When the comment was made.
- body: str#
Body text of the comment. In markdown format.
- body_html: str#
HTML of the comment.
- score: int#
Number of upvotes (minus downvotes).
Whether the score should be hidden.
- permalink_path: str#
URL of the comment, without the domain.
- permalink: str#
URL of the comment.
- is_edited: bool#
True if the comment was edited.
- edited: Comment.Edited | None#
Value non-
None
if the comment was edited.
- is_submitter: bool#
True if the author of this comment is the submission author (“OP”).
- stickied: bool#
- locked: bool#
- collapsed: bool#
Whether the comment is collapsed by default, i.e., when it has been downvoted significantly.
- distinguished: str#
Empty string if not distinguished, otherwise
'moderator'
or'admin'
.
- is_top_level: bool#
Whether the comment is a direct child of the submission.
- has_parent_comment: bool#
Same as
not self.is_top_level
.
- parent_comment_id36: str#
Parent comment ID36.
Empty string if not applicable.
- parent_comment_idn: int#
Parent comment ID.
Value is
0
if not applicable.
- parent_comment_id: int#
Same as
parent_comment_idn
.
- me: Comment.Me#
Attributes relating to the current user.
If there is no user context, these values contain nonsense.
- author_display_name: str#
The author’s username.
Possibly
[removed]
if the comment was removed or[deleted]
if the comment was deleted by the author.
- author: Comment.Author | None#
Information about the author.
Value is
None
if the comment was removed or deleted.
- mod: Comment.Moderation | None#
Attributes relating to moderation.
Value is
None
if the current user is not a moderator of the subreddit.
- class redditwarp.models.comment.LooseComment(d: Mapping[str, Any])[source]#
Bases:
Comment
- property submission: Submission#
Information related to the comment’s submission.