redditwarp.models.submission_draft
#
- class redditwarp.models.submission_draft.SubmissionDraft(d: Mapping[str, Any], uuid: str, created_at: datetime, modified_at: datetime, public: bool, subreddit_id: int | None, title: str, reply_notifications: bool, spoiler: bool, nsfw: bool, oc: bool, flair: Flair | None)[source]#
Bases:
DatamementoDataclassesMixin
A public draft link is of the following format:
https://www.reddit.com/user/{USERNAME}/draft/{self.uuid}
- class Flair(uuid: 'str', text_mode: 'str', text: 'str', bg_color: 'str', fg_color_scheme: 'str')[source]#
Bases:
object
- uuid: str#
The chosen flair template UUID.
- text_mode: str#
Either
text
orrichtext
.
- text: str#
Flair text.
- bg_color: str#
Reminder: cannot be an empty string since this is isn’t a user flair.
- fg_color_scheme: str#
Either
dark
orlight
.
- d: Mapping[str, Any]#
- uuid: str#
- created_at: datetime#
Datetime object of when the draft was created.
- modified_at: datetime#
Datetime object of when the draft was last modified.
- public: bool#
Whether the draft’s link is public.
Only those with the link can find the draft.
- subreddit_id: int | None#
The ID36 of the target subreddit.
Value is null if not chosen yet.
- title: str#
- reply_notifications: bool#
- spoiler: bool#
- nsfw: bool#
- oc: bool#
Whether the post should be marked as ‘original content’.
- class redditwarp.models.submission_draft.TextPostDraft(d: Mapping[str, Any], uuid: str, created_at: datetime, modified_at: datetime, public: bool, subreddit_id: int | None, title: str, reply_notifications: bool, spoiler: bool, nsfw: bool, oc: bool, flair: Flair | None)[source]#
Bases:
SubmissionDraft
- class redditwarp.models.submission_draft.MarkdownTextPostDraft(d: 'Mapping[str, Any]', uuid: 'str', created_at: 'datetime', modified_at: 'datetime', public: 'bool', subreddit_id: 'Optional[int]', title: 'str', reply_notifications: 'bool', spoiler: 'bool', nsfw: 'bool', oc: 'bool', flair: 'Optional[Flair]', body: 'str')[source]#
Bases:
TextPostDraft
- body: str#
The body text of the submission draft. In markdown format.
- class redditwarp.models.submission_draft.RichTextTextPostDraft(d: Mapping[str, Any], uuid: str, created_at: datetime, modified_at: datetime, public: bool, subreddit_id: int | None, title: str, reply_notifications: bool, spoiler: bool, nsfw: bool, oc: bool, flair: Flair | None)[source]#
Bases:
TextPostDraft
- class redditwarp.models.submission_draft.LinkPostDraft(d: 'Mapping[str, Any]', uuid: 'str', created_at: 'datetime', modified_at: 'datetime', public: 'bool', subreddit_id: 'Optional[int]', title: 'str', reply_notifications: 'bool', spoiler: 'bool', nsfw: 'bool', oc: 'bool', flair: 'Optional[Flair]', link: 'str')[source]#
Bases:
SubmissionDraft
- link: str#
The linked URL.
- class redditwarp.models.submission_draft.SubmissionDraftList(drafts: Sequence[SubmissionDraft], subreddits: Sequence[Subreddit])[source]#
Bases:
Sequence
[SubmissionDraft
]- drafts: Sequence[SubmissionDraft]#