redditwarp.models.flair#

class redditwarp.models.flair.FlairTemplate(d: 'Mapping[str, Any]', uuid: 'str', text_mode: 'str', text: 'str', css_class: 'str', bg_color: 'str', fg_color_scheme: 'str', mod_only: 'bool', text_editable: 'bool', allowable_content: 'str', max_emojis: 'int')[source]#

Bases: DatamementoDataclassesMixin

d: Mapping[str, Any]#
uuid: str#
text_mode: str#

Either text or richtext.

text: str#
css_class: str#
bg_color: str#

A background color hex string. E.g., #46d160.

If a user flair template and the background color is unset then the value is an empty string. The value cannot be empty for post flair templates.

fg_color_scheme: str#

Either dark or light.

mod_only: bool#

Whether flair is only available for mods to select.

text_editable: bool#

Whether users are able to edit the flair text.

allowable_content: str#

Either: all, emoji, text.

Value all if both text and emojis are allowed in the flair text, emoji if only emojis are allowed, text if only text is allowed.

max_emojis: int#

Maximum number of emojis allowed in a flair.

An integer from 1 to 10.

class redditwarp.models.flair.FlairTemplateChoice(uuid: 'str', text: 'str', css_class: 'str', text_editable: 'bool')[source]#

Bases: object

uuid: str#
text: str#
css_class: str#
text_editable: bool#
class redditwarp.models.flair.FlairTemplateChoices(choices: 'Sequence[FlairTemplateChoice]', subreddit_flair_user_position: 'str')[source]#

Bases: Sequence[FlairTemplateChoice]

choices: Sequence[FlairTemplateChoice]#
subreddit_flair_user_position: str#

Either: left, right, or empty string.

class redditwarp.models.flair.UserFlairAssociation(user: 'str', text: 'str', css_class: 'str', has_had_flair_css_class_assigned_before_in_subreddit_when_no_flair_template_assigned: 'bool')[source]#

Bases: object

user: str#
text: str#
css_class: str#
has_had_flair_css_class_assigned_before_in_subreddit_when_no_flair_template_assigned: bool#