redditwarp.models.message
#
- class redditwarp.models.message.CommentMessageCause(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- USERNAME_MENTION = 1#
- SUBMISSION_REPLY = 2#
- COMMENT_REPLY = 3#
- class redditwarp.models.message.MailboxMessage(d: 'Mapping[str, Any]', subject: 'str', author_name: 'str', unread: 'bool')[source]#
Bases:
DatamementoDataclassesMixin
- d: Mapping[str, Any]#
- subject: str#
Subject of the message.
If a comment message (i.e.,
CommentMessage
) then the value will be:comment reply
if a comment reply.post reply
if a post reply.username mention
if a username mention.
- author_name: str#
Author name.
Unknown what happens if the user is deleted. Is the value
[deleted]
, an empty string, or does the field in the underlying object not exist? If you have any information about this, please open an issue report at https://github.com/Pyprohly/redditwarp/issues.
- unread: bool#
- class redditwarp.models.message.ComposedMessage(d: 'Mapping[str, Any]', subject: 'str', author_name: 'str', unread: 'bool', id: 'int', unixtime: 'int', datetime: 'DateTime', body: 'str', body_html: 'str', distinguished: 'str', src_user_name: 'Optional[str]', src_subr_name: 'Optional[str]', dst_user_name: 'Optional[str]', dst_subr_name: 'Optional[str]', src_user_id: 'Optional[int]')[source]#
Bases:
MailboxMessage
- id: int#
- unixtime: int#
Unix timestamp of when the composed message was sent.
- datetime: DateTime#
A datetime object of when the composed message was sent.
- body: str#
The message content.
- body_html: str#
The message content as HTML.
- unread: bool#
Whether the message is new.
- distinguished: str#
Either:
moderator
,admin
,gold-auto
, or empty string.Empty string if not distinguished.
- src_user_name: str | None#
Username of the sender.
- src_subr_name: str | None#
Name of the subreddit in which the message was sent from.
- dst_user_name: str | None#
Username of the recipient.
- dst_subr_name: str | None#
Name of the subreddit in which the message was sent to.
- src_user_id: int | None#
ID of the user who sent the message.
- class redditwarp.models.message.CommentMessage(d: 'Mapping[str, Any]', subject: 'str', author_name: 'str', unread: 'bool', cause: 'CommentMessageCause', submission: 'CommentMessage.Submission', comment: 'CommentMessage.Comment')[source]#
Bases:
MailboxMessage
- class Submission(id: 'int', title: 'str', permalink_path: 'str', permalink: 'str', comment_count: 'int')[source]#
Bases:
object
- id: int#
- title: str#
- permalink_path: str#
- permalink: str#
- comment_count: int#
- class Comment(id: 'int', created_ut: 'int', created_at: 'DateTime', author_name: 'str', author_id: 'int', subreddit_name: 'str', permalink_path: 'str', permalink: 'str', is_top_level: 'bool', has_parent_comment: 'bool', parent_comment_id36: 'str', parent_comment_idn: 'int', parent_comment_id: 'int', score: 'int', body: 'str', body_html: 'str', voted: 'int')[source]#
Bases:
object
- id: int#
- created_ut: int#
- created_at: DateTime#
- author_name: str#
Author name.
Unknown what happens if the user is deleted. Is the value
[deleted]
, an empty string, or does the field in the underlying object not exist? If you have any information about this, please open an issue report at https://github.com/Pyprohly/redditwarp/issues.
- author_id: int#
Author ID.
Unknown what happens if the user is deleted. If you have any information about this, please open an issue report at https://github.com/Pyprohly/redditwarp/issues.
- subreddit_name: str#
Subreddit name.
Unknown what happens if the subreddit is deleted. Is the value
[deleted]
, an empty string, or does the field in the underlying object not exist? If you have any information about this, please open an issue report at https://github.com/Pyprohly/redditwarp/issues.
- permalink_path: str#
- permalink: str#
- is_top_level: bool#
- has_parent_comment: bool#
- parent_comment_id36: str#
- parent_comment_idn: int#
- parent_comment_id: int#
- score: int#
- body: str#
- body_html: str#
- voted: int#
- cause: CommentMessageCause#
- submission: CommentMessage.Submission#
- comment: CommentMessage.Comment#