Comment#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Comment(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.Comment(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
A class that represents a Reddit comment.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -442,21 +442,21 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The subreddit ID that the comment belongs to.
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │Comment
instance.
-
│ │ │
- │ │ │ -award(*, gild_type: str = 'gid_2', is_anonymous: bool = True, message: str = None) dict # │ │ │ +award(*, gild_type: str = 'gid_2', is_anonymous: bool = True, message: str = None) dict # │ │ │
Award the author of the item.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
gild_type – Type of award to give. See table below for currently know │ │ │ global award types.
│ │ │ is_anonymous – If
True
, the authenticated user’s username will not be │ │ │ @@ -650,15 +650,15 @@ │ │ │See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -edit(body: str) Union[praw.models.Comment, praw.models.Submission] # │ │ │ +edit(body: str) Union[praw.models.Comment, praw.models.Submission] # │ │ │
Replace the body of the object with
│ │ │body
.-
│ │ │
- Parameters: │ │ │
body – The Markdown formatted content for the updated object.
│ │ │
│ │ │ - Returns: │ │ │
The current instance after updating its attributes.
│ │ │ @@ -691,35 +691,35 @@ │ │ │See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -property fullname: str# │ │ │ +property fullname: str# │ │ │
Return the object’s fullname.
│ │ │A fullname is an object’s kind mapping like
│ │ │t3
followed by an underscore and │ │ │ the object’s base36 ID, e.g.,t1_c5s96e0
.
-
│ │ │
- │ │ │ -gild() dict # │ │ │ +gild() dict # │ │ │
Alias for
│ │ │award()
to maintain backwards compatibility.
-
│ │ │
- │ │ │ -static id_from_url(url: str) str # │ │ │ +static id_from_url(url: str) str # │ │ │
Get the ID of a comment from the full URL.
│ │ │
-
│ │ │
- │ │ │ -property is_root: bool# │ │ │ +property is_root: bool# │ │ │
Return
│ │ │True
when the comment is a top-level comment.
-
│ │ │
- │ │ │ mark_read()# │ │ │
Mark a single inbox item as read.
│ │ │ @@ -774,15 +774,15 @@ │ │ │ comment.mod.approve() │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -parent() Union[Comment, praw.models.Submission] # │ │ │ +parent() Union[Comment, praw.models.Submission] # │ │ │
Return the parent of the comment.
│ │ │The returned parent will be an instance of either
│ │ │Comment
, or │ │ │Submission
.If this comment was obtained through a
Submission
, then its entire │ │ │ ancestry should be immediately available, requiring no extra network requests. │ │ │ However, if this comment was obtained through other means, e.g., │ │ │reddit.comment("COMMENT_ID")
, orreddit.inbox.comment_replies
, then the │ │ │ @@ -819,15 +819,15 @@ │ │ │ │ │ │The above code should result in 5 network requests to Reddit. Without the calls │ │ │ to
│ │ │refresh()
it would make at least 31 network requests.
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
The appropriate values for
│ │ │ │ │ │reply_sort
include"confidence"
, │ │ │"controversial"
,"new"
,"old"
,"q&a"
, and"top"
.
-
│ │ │
- │ │ │ -reply(body: str) Optional[Union[praw.models.Comment, praw.models.Message]] # │ │ │ +reply(body: str) Optional[Union[praw.models.Comment, praw.models.Message]] # │ │ │
Reply to the object.
│ │ │-
│ │ │
- Parameters: │ │ │
body – The Markdown formatted content for a comment.
│ │ │
│ │ │ - Returns: │ │ │
A
Comment
orMessage
object for the newly created │ │ │ @@ -898,15 +898,15 @@ │ │ │ comment.reply("reply") │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -report(reason: str)# │ │ │ +report(reason: str)# │ │ │
Report this object to the moderators of its subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
reason – The reason for reporting.
│ │ │
│ │ │ - Raises: │ │ │
RedditAPIException
ifreason
is longer than 100 │ │ │ @@ -921,15 +921,15 @@ │ │ │ comment.report("report reason") │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -save(*, category: Optional[str] = None)# │ │ │ +save(*, category: Optional[str] = None)# │ │ │
Save the object.
│ │ │-
│ │ │
- Parameters: │ │ │
category – The category to save to. If the authenticated user does not │ │ │ have Reddit Premium this value is ignored by Reddit (default:
│ │ │None
).
│ │ │
│ │ │ │ │ │ Draft#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Draft(reddit: praw.Reddit, id: Optional[str] = None, _data: Dict[str, Any] = None)# │ │ │ +class praw.models.Draft(reddit: praw.Reddit, id: Optional[str] = None, _data: Dict[str, Any] = None)# │ │ │
A class that represents a Reddit submission draft.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -414,15 +414,15 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The URL the submission draft links to.
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, id: Optional[str] = None, _data: Dict[str, Any] = None)# │ │ │ +__init__(reddit: praw.Reddit, id: Optional[str] = None, _data: Dict[str, Any] = None)# │ │ │
Initialize a
│ │ │Draft
instance.
-
│ │ │
- │ │ │ delete()# │ │ │
Delete the
│ │ │ @@ -431,29 +431,29 @@ │ │ │ draft.delete() │ │ │ │ │ │ │ │ │Draft
.
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -submit(*, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: Optional[bool] = None, selftext: Optional[str] = None, spoiler: Optional[bool] = None, subreddit: Optional[Union[str, praw.models.Subreddit, praw.models.UserSubreddit]] = None, title: Optional[str] = None, url: Optional[str] = None, **submit_kwargs) praw.models.Submission # │ │ │ +submit(*, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: Optional[bool] = None, selftext: Optional[str] = None, spoiler: Optional[bool] = None, subreddit: Optional[Union[str, praw.models.Subreddit, praw.models.UserSubreddit]] = None, title: Optional[str] = None, url: Optional[str] = None, **submit_kwargs) praw.models.Submission # │ │ │
Submit a draft.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
flair_id – The flair template to select (default:
None
).
│ │ │ flair_text – If the template’s
flair_text_editable
value isTrue
, │ │ │ this value will set a custom text (default:None
).flair_id
is │ │ │ @@ -502,15 +502,15 @@ │ │ │submit_video()
to submit videos and videogifs
│ │ │
-
│ │ │
- │ │ │ -update(*, flair_id: Optional[str] = None, flair_text: Optional[str] = None, is_public_link: Optional[bool] = None, nsfw: Optional[bool] = None, original_content: Optional[bool] = None, selftext: Optional[str] = None, send_replies: Optional[bool] = None, spoiler: Optional[bool] = None, subreddit: Optional[Union[str, praw.models.Subreddit, praw.models.UserSubreddit]] = None, title: Optional[str] = None, url: Optional[str] = None, **draft_kwargs)# │ │ │ +update(*, flair_id: Optional[str] = None, flair_text: Optional[str] = None, is_public_link: Optional[bool] = None, nsfw: Optional[bool] = None, original_content: Optional[bool] = None, selftext: Optional[str] = None, send_replies: Optional[bool] = None, spoiler: Optional[bool] = None, subreddit: Optional[Union[str, praw.models.Subreddit, praw.models.UserSubreddit]] = None, title: Optional[str] = None, url: Optional[str] = None, **draft_kwargs)# │ │ │
Update the
│ │ │Draft
.│ │ ││ │ │Note
│ │ │Only provided values will be updated.
│ │ │-
│ │ │
- Parameters: │ │ │ ├── html2text {} │ │ │ │ @@ -161,16 +161,16 @@ │ │ │ │ * _R_e_f_e_r_e_n_c_e_s │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ DDrraafftt_## ************ │ │ │ │ - ccllaassss praw.models.Draft(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: │ │ │ │ - _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]] == NNoonnee)_# │ │ │ │ + ccllaassss praw.models.Draft(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: │ │ │ │ + DDiicctt[[ssttrr,, AAnnyy]] == NNoonnee)_# │ │ │ │ A class that represents a Reddit submission draft. │ │ │ │ TTyyppiiccaall AAttttrriibbuutteess │ │ │ │ Note │ │ │ │ This table describes attributes that typically belong to objects of this │ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via │ │ │ │ the API. Since those attributes are subject to change on Reddit’s end, │ │ │ │ PRAW makes no effort to document any new/removed/changed attributes, │ │ │ │ @@ -191,32 +191,32 @@ │ │ │ │ submission draft. │ │ │ │ spoiler Whether the submission will be marked as a │ │ │ │ spoiler. │ │ │ │ subreddit Provides an instance of _S_u_b_r_e_d_d_i_t or _U_s_e_r_S_u_b_r_e_d_d_i_t │ │ │ │ (if set). │ │ │ │ title The title of the submission draft. │ │ │ │ url The URL the submission draft links to. │ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _DD_ii_cc_tt │ │ │ │ - [[_ss_tt_rr,, _AA_nn_yy]] == NNoonnee)_# │ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: DDiicctt │ │ │ │ + [[ssttrr,, AAnnyy]] == NNoonnee)_# │ │ │ │ Initialize a _D_r_a_f_t instance. │ │ │ │ delete()_# │ │ │ │ Delete the _D_r_a_f_t. │ │ │ │ Example usage: │ │ │ │ draft = reddit.drafts("124862bc-e1e9-11eb-aa4f-e68667a77cbb") │ │ │ │ draft.delete() │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_# │ │ │ │ Return an instance of cls from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - submit(**, ffllaaiirr__iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ffllaaiirr__tteexxtt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == │ │ │ │ - NNoonnee, nnssffww:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == NNoonnee, sseellfftteexxtt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, │ │ │ │ - ssppooiilleerr:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == NNoonnee, ssuubbrreeddddiitt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn[[_ss_tt_rr,, │ │ │ │ + submit(**, ffllaaiirr__iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, ffllaaiirr__tteexxtt:: OOppttiioonnaall[[ssttrr]] == │ │ │ │ + NNoonnee, nnssffww:: OOppttiioonnaall[[bbooooll]] == NNoonnee, sseellfftteexxtt:: OOppttiioonnaall[[ssttrr]] == NNoonnee, │ │ │ │ + ssppooiilleerr:: OOppttiioonnaall[[bbooooll]] == NNoonnee, ssuubbrreeddddiitt:: OOppttiioonnaall[[UUnniioonn[[ssttrr,, │ │ │ │ _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._UU_ss_ee_rr_SS_uu_bb_rr_ee_dd_dd_ii_tt]]]] == NNoonnee, ttiittllee:: │ │ │ │ - _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, uurrll:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ****ssuubbmmiitt__kkwwaarrggss) → │ │ │ │ + OOppttiioonnaall[[ssttrr]] == NNoonnee, uurrll:: OOppttiioonnaall[[ssttrr]] == NNoonnee, ****ssuubbmmiitt__kkwwaarrggss) → │ │ │ │ _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n_# │ │ │ │ Submit a draft. │ │ │ │ Parameters: │ │ │ │ * ffllaaiirr__iidd – The flair template to select (default: │ │ │ │ None). │ │ │ │ * ffllaaiirr__tteexxtt – If the template’s flair_text_editable │ │ │ │ value is True, this value will set a custom text │ │ │ │ @@ -251,21 +251,21 @@ │ │ │ │ See also │ │ │ │ * _s_u_b_m_i_t_(_) to submit url posts and selftexts │ │ │ │ * _s_u_b_m_i_t___g_a_l_l_e_r_y_(_). to submit more than one image in the same │ │ │ │ post │ │ │ │ * _s_u_b_m_i_t___i_m_a_g_e_(_) to submit images │ │ │ │ * _s_u_b_m_i_t___p_o_l_l_(_) to submit polls │ │ │ │ * _s_u_b_m_i_t___v_i_d_e_o_(_) to submit videos and videogifs │ │ │ │ - update(**, ffllaaiirr__iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ffllaaiirr__tteexxtt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == │ │ │ │ - NNoonnee, iiss__ppuubblliicc__lliinnkk:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == NNoonnee, nnssffww:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == │ │ │ │ - NNoonnee, oorriiggiinnaall__ccoonntteenntt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == NNoonnee, sseellfftteexxtt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] │ │ │ │ - == NNoonnee, sseenndd__rreepplliieess:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == NNoonnee, ssppooiilleerr:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] == │ │ │ │ - NNoonnee, ssuubbrreeddddiitt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, │ │ │ │ - _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._UU_ss_ee_rr_SS_uu_bb_rr_ee_dd_dd_ii_tt]]]] == NNoonnee, ttiittllee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, uurrll:: │ │ │ │ - _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ****ddrraafftt__kkwwaarrggss)_# │ │ │ │ + update(**, ffllaaiirr__iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, ffllaaiirr__tteexxtt:: OOppttiioonnaall[[ssttrr]] == │ │ │ │ + NNoonnee, iiss__ppuubblliicc__lliinnkk:: OOppttiioonnaall[[bbooooll]] == NNoonnee, nnssffww:: OOppttiioonnaall[[bbooooll]] == │ │ │ │ + NNoonnee, oorriiggiinnaall__ccoonntteenntt:: OOppttiioonnaall[[bbooooll]] == NNoonnee, sseellfftteexxtt:: OOppttiioonnaall[[ssttrr]] │ │ │ │ + == NNoonnee, sseenndd__rreepplliieess:: OOppttiioonnaall[[bbooooll]] == NNoonnee, ssppooiilleerr:: OOppttiioonnaall[[bbooooll]] == │ │ │ │ + NNoonnee, ssuubbrreeddddiitt:: OOppttiioonnaall[[UUnniioonn[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, │ │ │ │ + _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._UU_ss_ee_rr_SS_uu_bb_rr_ee_dd_dd_ii_tt]]]] == NNoonnee, ttiittllee:: OOppttiioonnaall[[ssttrr]] == NNoonnee, uurrll:: │ │ │ │ + OOppttiioonnaall[[ssttrr]] == NNoonnee, ****ddrraafftt__kkwwaarrggss)_# │ │ │ │ Update the _D_r_a_f_t. │ │ │ │ Note │ │ │ │ Only provided values will be updated. │ │ │ │ Parameters: │ │ │ │ * ffllaaiirr__iidd – The flair template to select. │ │ │ │ * ffllaaiirr__tteexxtt – If the template’s flair_text_editable │ │ │ │ value is True, this value will set a custom text. │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/models/livethread.html │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ │ │ │ │ │
- │ │ │ -class praw.models.LiveThread(reddit: praw.Reddit, id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.LiveThread(reddit: praw.Reddit, id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
An individual
│ │ │LiveThread
object.Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -398,15 +398,15 @@ │ │ │ marked as NSFW.
│ │ │ │ │ │ │ │ │ │ │ │-
│ │ │
- │ │ │ -__getitem__(update_id: str) praw.models.LiveUpdate # │ │ │ +__getitem__(update_id: str) praw.models.LiveUpdate # │ │ │
Return a lazy
│ │ │LiveUpdate
instance.-
│ │ │
- Parameters: │ │ │
update_id – A live update ID, e.g., │ │ │
│ │ │"7827987a-c998-11e4-a0b9-22000b6a88d2"
.
│ │ │
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │LiveThread
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
reddit – An instance of
Reddit
.
│ │ │ id – A live thread ID, e.g.,
"ukaeu1ik4sw5"
│ │ │
-
│ │ │
- │ │ │ -discussions(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │ +discussions(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │
Get submissions linking to the thread.
│ │ │-
│ │ │
- Parameters: │ │ │
generator_kwargs – keyword arguments passed to
│ │ │ListingGenerator
│ │ │ constructor.
│ │ │ - Returns: │ │ │ @@ -482,29 +482,29 @@ │ │ │ print(submission.title) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -report(type: str)# │ │ │ +report(type: str)# │ │ │
Report the thread violating the Reddit rules.
│ │ │-
│ │ │
- Parameters: │ │ │
type – One of
│ │ │"spam"
,"vote-manipulation"
,"personal- │ │ │ information"
,"sexualizing-minors"
, or"site-breaking"
.
│ │ │
-
│ │ │
- │ │ │ -updates(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.LiveUpdate] # │ │ │ +updates(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.LiveUpdate] # │ │ │
Return a
│ │ │ListingGenerator
yieldsLiveUpdate
s.-
│ │ │
- Parameters: │ │ │
generator_kwargs – keyword arguments passed to
│ │ │ListingGenerator
│ │ │ constructor.
│ │ │ - Returns: │ │ │ ├── html2text {} │ │ │ │ @@ -161,16 +161,16 @@ │ │ │ │ * _R_e_f_e_r_e_n_c_e_s │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ LLiivveeTThhrreeaadd_## ************ │ │ │ │ - ccllaassss praw.models.LiveThread(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, │ │ │ │ - __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_# │ │ │ │ + ccllaassss praw.models.LiveThread(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, │ │ │ │ + __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_# │ │ │ │ An individual _L_i_v_e_T_h_r_e_a_d object. │ │ │ │ TTyyppiiccaall AAttttrriibbuutteess │ │ │ │ Note │ │ │ │ This table describes attributes that typically belong to objects of this │ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via │ │ │ │ the API. Since those attributes are subject to change on Reddit’s end, │ │ │ │ PRAW makes no effort to document any new/removed/changed attributes, │ │ │ │ @@ -182,27 +182,27 @@ │ │ │ │ AAttttrriibbuuttee DDeessccrriippttiioonn │ │ │ │ created_utc The creation time of the live thread, in _U_n_i_x_ _T_i_m_e. │ │ │ │ description Description of the live thread, as Markdown. │ │ │ │ description_html Description of the live thread, as HTML. │ │ │ │ id The ID of the live thread. │ │ │ │ nsfw A bool representing whether or not the live thread is │ │ │ │ marked as NSFW. │ │ │ │ - __getitem__(uuppddaattee__iidd:: _ss_tt_rr) → _p_r_a_w_._m_o_d_e_l_s_._L_i_v_e_U_p_d_a_t_e_# │ │ │ │ + __getitem__(uuppddaattee__iidd:: ssttrr) → _p_r_a_w_._m_o_d_e_l_s_._L_i_v_e_U_p_d_a_t_e_# │ │ │ │ Return a lazy _L_i_v_e_U_p_d_a_t_e instance. │ │ │ │ Parameters: │ │ │ │ uuppddaattee__iidd – A live update ID, e.g., "7827987a-c998-11e4-a0b9- │ │ │ │ 22000b6a88d2". │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ update = thread["7827987a-c998-11e4-a0b9-22000b6a88d2"] │ │ │ │ update.thread # LiveThread(id="ukaeu1ik4sw5") │ │ │ │ update.id # "7827987a-c998-11e4-a0b9-22000b6a88d2" │ │ │ │ update.author # "umbrae" │ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll │ │ │ │ - [[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_# │ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: OOppttiioonnaall │ │ │ │ + [[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_# │ │ │ │ Initialize a _L_i_v_e_T_h_r_e_a_d instance. │ │ │ │ Parameters: │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ * iidd – A live thread ID, e.g., "ukaeu1ik4sw5" │ │ │ │ contrib() → _p_r_a_w_._m_o_d_e_l_s_._r_e_d_d_i_t_._l_i_v_e_._L_i_v_e_T_h_r_e_a_d_C_o_n_t_r_i_b_u_t_i_o_n_# │ │ │ │ Provide an instance of _L_i_v_e_T_h_r_e_a_d_C_o_n_t_r_i_b_u_t_i_o_n. │ │ │ │ Usage: │ │ │ │ @@ -214,34 +214,34 @@ │ │ │ │ represented as _R_e_d_d_i_t_o_r_L_i_s_t instance consists of _R_e_d_d_i_t_o_r │ │ │ │ instances. Those _R_e_d_d_i_t_o_r instances have permissions attributes as │ │ │ │ contributors: │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ for contributor in thread.contributor(): │ │ │ │ # prints `Redditor(name="Acidtwist") ["all"]` │ │ │ │ print(contributor, contributor.permissions) │ │ │ │ - discussions(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → │ │ │ │ - _I_t_e_r_a_t_o_r[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_# │ │ │ │ + discussions(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → │ │ │ │ + Iterator[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_# │ │ │ │ Get submissions linking to the thread. │ │ │ │ Parameters: │ │ │ │ ggeenneerraattoorr__kkwwaarrggss – keyword arguments passed to │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r constructor. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _S_u_b_m_i_s_s_i_o_n objects. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ for submission in thread.discussions(limit=None): │ │ │ │ print(submission.title) │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_# │ │ │ │ Return an instance of cls from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - report(ttyyppee:: _ss_tt_rr)_# │ │ │ │ + report(ttyyppee:: ssttrr)_# │ │ │ │ Report the thread violating the Reddit rules. │ │ │ │ Parameters: │ │ │ │ ttyyppee – One of "spam", "vote-manipulation", "personal- │ │ │ │ information", "sexualizing-minors", or "site-breaking". │ │ │ │ Usage: │ │ │ │ thread = reddit.live("xyu8kmjvfrww") │ │ │ │ thread.report("spam") │ │ │ │ @@ -254,15 +254,15 @@ │ │ │ │ Updates are yielded oldest first as _L_i_v_e_U_p_d_a_t_e. Up to 100 │ │ │ │ historical updates will initially be returned. To only retrieve new │ │ │ │ updates starting from when the stream is created, pass │ │ │ │ skip_existing=True: │ │ │ │ live_thread = reddit.live("ta535s1hq2je") │ │ │ │ for live_update in live_thread.stream.updates(skip_existing=True): │ │ │ │ print(live_update.author) │ │ │ │ - updates(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ + updates(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ [_p_r_a_w_._m_o_d_e_l_s_._L_i_v_e_U_p_d_a_t_e]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r yields _L_i_v_e_U_p_d_a_t_e s. │ │ │ │ Parameters: │ │ │ │ ggeenneerraattoorr__kkwwaarrggss – keyword arguments passed to │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r constructor. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _L_i_v_e_U_p_d_a_t_e objects. │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/models/liveupdate.html │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ │ │ │ │ │
- │ │ │ -class praw.models.LiveUpdate(reddit: praw.Reddit, thread_id: Optional[str] = None, update_id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.LiveUpdate(reddit: praw.Reddit, thread_id: Optional[str] = None, update_id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
An individual
│ │ │LiveUpdate
object.Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -398,15 +398,15 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │strike()
).-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, thread_id: Optional[str] = None, update_id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, thread_id: Optional[str] = None, update_id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │LiveUpdate
instance.Either
│ │ │thread_id
andupdate_id
, or_data
must be provided.-
│ │ │
- Parameters: │ │ │
-
│ │ │
reddit – An instance of
Reddit
.
│ │ │ thread_id – A live thread ID, e.g.,
"ukaeu1ik4sw5"
.
│ │ │ @@ -434,23 +434,23 @@
│ │ │ update.contrib # LiveUpdateContribution instance
│ │ │
│ │ │
│ │ │
-
│ │ │
- │ │ │ -property fullname: str# │ │ │ +property fullname: str# │ │ │
Return the object’s fullname.
│ │ │A fullname is an object’s kind mapping like
│ │ │t3
followed by an underscore and │ │ │ the object’s base36 ID, e.g.,t1_c5s96e0
.
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │ │ │ │ Message#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Message(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +class praw.models.Message(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
A class for private messages.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -410,15 +410,15 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │Whether or not the message was a comment reply.
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Initialize a
│ │ │Message
instance.
-
│ │ │
- │ │ │ block()# │ │ │
Block the user who sent the item.
│ │ │ @@ -471,15 +471,15 @@ │ │ ││ │ ││ │ │next(reddit.inbox.all()).delete() │ │ │
-
│ │ │
- │ │ │ -property fullname: str# │ │ │ +property fullname: str# │ │ │
Return the object’s fullname.
│ │ │A fullname is an object’s kind mapping like
│ │ │t3
followed by an underscore and │ │ │ the object’s base36 ID, e.g.,t1_c5s96e0
.
-
│ │ │
-
│ │ │ @@ -525,35 +525,35 @@
│ │ │
See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -property parent: Optional[praw.models.Message]# │ │ │ +property parent: Optional[praw.models.Message]# │ │ │
Return the parent of the message if it exists.
│ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit)# │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit)# │ │ │
Return an instance of
│ │ │Message
orSubredditMessage
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -reply(body: str) Optional[Union[praw.models.Comment, praw.models.Message]] # │ │ │ +reply(body: str) Optional[Union[praw.models.Comment, praw.models.Message]] # │ │ │
Reply to the object.
│ │ │-
│ │ │
- Parameters: │ │ │
body – The Markdown formatted content for a comment.
│ │ │
│ │ │ - Returns: │ │ │
A
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │Comment
orMessage
object for the newly created │ │ │ ├── html2text {} │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │ * _R_e_f_e_r_e_n_c_e_s │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ MMeessssaaggee_## ************ │ │ │ │ - ccllaassss praw.models.Message(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]])_# │ │ │ │ + ccllaassss praw.models.Message(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]])_# │ │ │ │ A class for private messages. │ │ │ │ TTyyppiiccaall AAttttrriibbuutteess │ │ │ │ Note │ │ │ │ This table describes attributes that typically belong to objects of this │ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via │ │ │ │ the API. Since those attributes are subject to change on Reddit’s end, │ │ │ │ PRAW makes no effort to document any new/removed/changed attributes, │ │ │ │ @@ -185,15 +185,15 @@ │ │ │ │ created_utc Time the message was created, represented in _U_n_i_x_ _T_i_m_e. │ │ │ │ dest Provides an instance of _R_e_d_d_i_t_o_r. The recipient of the │ │ │ │ message. │ │ │ │ id The ID of the message. │ │ │ │ name The full ID of the message, prefixed with t4_. │ │ │ │ subject The subject of the message. │ │ │ │ was_comment Whether or not the message was a comment reply. │ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]])_# │ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]])_# │ │ │ │ Initialize a _M_e_s_s_a_g_e instance. │ │ │ │ block()_# │ │ │ │ Block the user who sent the item. │ │ │ │ Note │ │ │ │ This method pertains only to objects which were retrieved via the │ │ │ │ inbox. │ │ │ │ Example usage: │ │ │ │ @@ -218,15 +218,15 @@ │ │ │ │ delete()_# │ │ │ │ Delete the message. │ │ │ │ Note │ │ │ │ Reddit does not return an indication of whether or not the message │ │ │ │ was successfully deleted. │ │ │ │ For example, to delete the most recent message in your inbox: │ │ │ │ next(reddit.inbox.all()).delete() │ │ │ │ - pprrooppeerrttyy fullname:: _ss_tt_rr_# │ │ │ │ + pprrooppeerrttyy fullname:: ssttrr_# │ │ │ │ Return the object’s fullname. │ │ │ │ A fullname is an object’s kind mapping like t3 followed by an │ │ │ │ underscore and the object’s base36 ID, e.g., t1_c5s96e0. │ │ │ │ mark_read()_# │ │ │ │ Mark a single inbox item as read. │ │ │ │ Note │ │ │ │ This method pertains only to objects which were retrieved via the │ │ │ │ @@ -250,22 +250,22 @@ │ │ │ │ inbox = reddit.inbox(limit=10) │ │ │ │ │ │ │ │ for message in inbox: │ │ │ │ # process messages │ │ │ │ ... │ │ │ │ See also │ │ │ │ _m_a_r_k___r_e_a_d_(_) │ │ │ │ - pprrooppeerrttyy parent:: _OO_pp_tt_ii_oo_nn_aa_ll[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._MM_ee_ss_ss_aa_gg_ee]]_# │ │ │ │ + pprrooppeerrttyy parent:: OOppttiioonnaall[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._MM_ee_ss_ss_aa_gg_ee]]_# │ │ │ │ Return the parent of the message if it exists. │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt)_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt)_# │ │ │ │ Return an instance of _M_e_s_s_a_g_e or _S_u_b_r_e_d_d_i_t_M_e_s_s_a_g_e from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - reply(bbooddyy:: _ss_tt_rr) → _O_p_t_i_o_n_a_l[_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, │ │ │ │ + reply(bbooddyy:: ssttrr) → Optional[Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, │ │ │ │ _p_r_a_w_._m_o_d_e_l_s_._M_e_s_s_a_g_e]]_# │ │ │ │ Reply to the object. │ │ │ │ Parameters: │ │ │ │ bbooddyy – The Markdown formatted content for a comment. │ │ │ │ Returns: │ │ │ │ A _C_o_m_m_e_n_t or _M_e_s_s_a_g_e object for the newly created comment or │ │ │ │ message or None if Reddit doesn’t provide one. │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/models/modmailconversation.html │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ │ │ │ │ ││ │ │ │ │ │ ModmailConversation#
│ │ │-
│ │ │
- │ │ │ -class praw.models.reddit.modmail.ModmailConversation(reddit: praw.Reddit, id: Optional[str] = None, mark_read: bool = False, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.reddit.modmail.ModmailConversation(reddit: praw.Reddit, id: Optional[str] = None, mark_read: bool = False, _data: Optional[Dict[str, Any]] = None)# │ │ │
A class for modmail conversations.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -430,15 +430,15 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The subject of the
ModmailConversation
.-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, id: Optional[str] = None, mark_read: bool = False, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, id: Optional[str] = None, mark_read: bool = False, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │ModmailConversation
instance.-
│ │ │
- Parameters: │ │ │
mark_read – If
│ │ │True
, conversation is marked as read (default: │ │ │False
).
│ │ │
│ │ ││ │ │reddit.subreddit("test").modmail("2gmz").mute(num_days=7) │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit, convert_objects: bool = True)# │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit, convert_objects: bool = True)# │ │ │
Return an instance of
│ │ │ModmailConversation
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │ convert_objects – If
True
, convert message and mod action data into │ │ │ @@ -498,15 +498,15 @@ │ │ │
│ │ │
-
│ │ │
- │ │ │ -read(*, other_conversations: Optional[List[ModmailConversation]] = None)# │ │ │ +read(*, other_conversations: Optional[List[ModmailConversation]] = None)# │ │ │
Mark the conversation(s) as read.
│ │ │-
│ │ │
- Parameters: │ │ │
other_conversations – A list of other conversations to mark (default: │ │ │
│ │ │None
).
│ │ │
-
│ │ │
- │ │ │ -reply(*, author_hidden: bool = False, body: str, internal: bool = False) ModmailMessage # │ │ │ +reply(*, author_hidden: bool = False, body: str, internal: bool = False) ModmailMessage # │ │ │
Reply to the conversation.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
author_hidden – When
True
, author is hidden from non-moderators │ │ │ (default:False
).
│ │ │ body – The Markdown formatted content for a message.
│ │ │ @@ -576,15 +576,15 @@
│ │ │
│ │ ││ │ │reddit.subreddit("test").modmail("2gmz").unmute() │ │ │
-
│ │ │
- │ │ │ -unread(*, other_conversations: Optional[List[ModmailConversation]] = None)# │ │ │ +unread(*, other_conversations: Optional[List[ModmailConversation]] = None)# │ │ │
Mark the conversation(s) as unread.
│ │ │-
│ │ │
- Parameters: │ │ │
other_conversations – A list of other conversations to mark (default: │ │ │
│ │ │None
).
│ │ │
│ │ │ │ │ │ MoreComments#
│ │ │-
│ │ │
- │ │ │ -class praw.models.MoreComments(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +class praw.models.MoreComments(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
A class indicating there are more comments.
│ │ │-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Initialize a
│ │ │MoreComments
instance.
-
│ │ │
- │ │ │ -comments(*, update: bool = True) List[praw.models.Comment] # │ │ │ +comments(*, update: bool = True) List[praw.models.Comment] # │ │ │
Fetch and return the comments for a single
│ │ │MoreComments
object.
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │ │ │ │ Multireddit#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Multireddit(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +class praw.models.Multireddit(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
A class for users’ multireddits.
│ │ │This is referred to as a “Custom Feed” on the Reddit UI.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ @@ -417,15 +417,15 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │"public"
, or"hidden"
.-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Initialize a
│ │ │Multireddit
instance.
-
│ │ │
- │ │ │ add(subreddit: praw.models.Subreddit)# │ │ │
Add a subreddit to this multireddit.
│ │ │ @@ -451,23 +451,23 @@ │ │ │ print(comment.author) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -controversial(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +controversial(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for controversial items.-
│ │ │
- Parameters: │ │ │
time_filter – Can be one of:
│ │ │"all"
,"day"
,"hour"
, │ │ │"month"
,"week"
, or"year"
(default:"all"
).
│ │ │ - Raises: │ │ │ -
│ │ │ +ValueError
iftime_filter
is invalid. │ │ │
│ │ │ValueError
iftime_filter
is invalid.
Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").controversial(time_filter="week") │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").controversial( │ │ │ @@ -479,15 +479,15 @@ │ │ │ reddit.subreddit("all").controversial(time_filter="hour") │ │ │
-
│ │ │
- │ │ │ -copy(*, display_name: Optional[str] = None) praw.models.Multireddit # │ │ │ +copy(*, display_name: Optional[str] = None) praw.models.Multireddit # │ │ │
Copy this multireddit and return the new multireddit.
│ │ │-
│ │ │
- Parameters: │ │ │
display_name – The display name for the copied multireddit. Reddit will │ │ │ generate the
│ │ │name
field from this display name. When not provided the │ │ │ copy will use the same display name and name as this multireddit.
│ │ │ @@ -506,28 +506,28 @@
│ │ │
│ │ ││ │ │reddit.multireddit(redditor="bboe", name="test").delete() │ │ │
-
│ │ │
- │ │ │ -gilded(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +gilded(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for gilded items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get gilded items in r/test:
│ │ ││ │ ││ │ │for item in reddit.subreddit("test").gilded(): │ │ │ print(item.id) │ │ │
-
│ │ │
- │ │ │ -hot(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +hot(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for hot items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").hot() │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").hot() │ │ │ reddit.redditor("spez").hot() │ │ │ @@ -536,15 +536,15 @@ │ │ │ reddit.subreddit("all").hot() │ │ │
-
│ │ │
- │ │ │ -new(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +new(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for new items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").new() │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").new() │ │ │ reddit.redditor("spez").new() │ │ │ @@ -553,29 +553,29 @@ │ │ │ reddit.subreddit("all").new() │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -random_rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │ +random_rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for random rising submissions.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get random rising submissions for r/test:
│ │ ││ │ │ │ │ ││ │ │ @@ -596,28 +596,28 @@ │ │ │ reddit.multireddit(redditor="bboe", name="test").remove(subreddit) │ │ │for submission in reddit.subreddit("test").random_rising(): │ │ │ print(submission.title) │ │ │
-
│ │ │
- │ │ │ -rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │ +rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for rising submissions.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get rising submissions for r/test:
│ │ ││ │ ││ │ │for submission in reddit.subreddit("test").rising(): │ │ │ print(submission.title) │ │ │
-
│ │ │
- │ │ │ -static sluggify(title: str)# │ │ │ +static sluggify(title: str)# │ │ │
Return a slug version of the title.
│ │ │-
│ │ │
- Parameters: │ │ │
title – The title to make a slug of.
│ │ │
│ │ │
Adapted from Reddit’s utils.py.
│ │ │ @@ -641,23 +641,23 @@ │ │ │ print(submission) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -top(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +top(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for top items.-
│ │ │
- Parameters: │ │ │
time_filter – Can be one of:
│ │ │"all"
,"day"
,"hour"
, │ │ │"month"
,"week"
, or"year"
(default:"all"
).
│ │ │ - Raises: │ │ │ -
│ │ │ +ValueError
iftime_filter
is invalid. │ │ │
│ │ │ValueError
iftime_filter
is invalid.
Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").top(time_filter="week") │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").top(time_filter="day") │ │ │ @@ -667,15 +667,15 @@ │ │ │ reddit.subreddit("all").top(time_filter="hour") │ │ │
-
│ │ │
- │ │ │ -update(**updated_settings: Union[str, List[Union[str, praw.models.Subreddit, Dict[str, str]]]])# │ │ │ +update(**updated_settings: Union[str, List[Union[str, praw.models.Subreddit, Dict[str, str]]]])# │ │ │
Update this multireddit.
│ │ │Keyword arguments are passed for settings that should be updated. They can any │ │ │ of:
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
display_name – The display name for this multireddit. Must be no longer │ │ │ ├── html2text {} │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │ * _R_e_f_e_r_e_n_c_e_s │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ MMuullttiirreeddddiitt_## ************ │ │ │ │ - ccllaassss praw.models.Multireddit(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]])_# │ │ │ │ + ccllaassss praw.models.Multireddit(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]])_# │ │ │ │ A class for users’ multireddits. │ │ │ │ This is referred to as a “Custom Feed” on the Reddit UI. │ │ │ │ TTyyppiiccaall AAttttrriibbuutteess │ │ │ │ Note │ │ │ │ This table describes attributes that typically belong to objects of this │ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via │ │ │ │ the API. Since those attributes are subject to change on Reddit’s end, │ │ │ │ @@ -190,125 +190,125 @@ │ │ │ │ display_name The display name of the multireddit. │ │ │ │ name The name of the multireddit. │ │ │ │ over_18 A bool representing whether or not the multireddit is │ │ │ │ restricted for users over 18. │ │ │ │ subreddits A list of _S_u_b_r_e_d_d_i_ts that make up the multireddit. │ │ │ │ visibility The visibility of the multireddit, either "private", │ │ │ │ "public", or "hidden". │ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]])_# │ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]])_# │ │ │ │ Initialize a _M_u_l_t_i_r_e_d_d_i_t instance. │ │ │ │ add(ssuubbrreeddddiitt:: _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt)_# │ │ │ │ Add a subreddit to this multireddit. │ │ │ │ Parameters: │ │ │ │ ssuubbrreeddddiitt – The subreddit to add to this multi. │ │ │ │ For example, to add r/test to multireddit bboe/test: │ │ │ │ subreddit = reddit.subreddit("test") │ │ │ │ reddit.multireddit(redditor="bboe", name="test").add(subreddit) │ │ │ │ comments() → _C_o_m_m_e_n_t_H_e_l_p_e_r_# │ │ │ │ Provide an instance of _C_o_m_m_e_n_t_H_e_l_p_e_r. │ │ │ │ For example, to output the author of the 25 most recent comments of │ │ │ │ r/test execute: │ │ │ │ for comment in reddit.subreddit("test").comments(limit=25): │ │ │ │ print(comment.author) │ │ │ │ - controversial(**, ttiimmee__ffiilltteerr:: _ss_tt_rr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn │ │ │ │ - [[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r[_A_n_y]_# │ │ │ │ + controversial(**, ttiimmee__ffiilltteerr:: ssttrr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn │ │ │ │ + [[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator[Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for controversial items. │ │ │ │ Parameters: │ │ │ │ ttiimmee__ffiilltteerr – Can be one of: "all", "day", "hour", "month", │ │ │ │ "week", or "year" (default: "all"). │ │ │ │ Raises: │ │ │ │ - _V_a_l_u_e_E_r_r_o_r if time_filter is invalid. │ │ │ │ + ValueError if time_filter is invalid. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").controversial(time_filter="week") │ │ │ │ reddit.multireddit(redditor="samuraisam", │ │ │ │ name="programming").controversial( │ │ │ │ time_filter="day" │ │ │ │ ) │ │ │ │ reddit.redditor("spez").controversial(time_filter="month") │ │ │ │ reddit.redditor("spez").comments.controversial(time_filter="year") │ │ │ │ reddit.redditor("spez").submissions.controversial │ │ │ │ (time_filter="all") │ │ │ │ reddit.subreddit("all").controversial(time_filter="hour") │ │ │ │ - copy(**, ddiissppllaayy__nnaammee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee) → _p_r_a_w_._m_o_d_e_l_s_._M_u_l_t_i_r_e_d_d_i_t_# │ │ │ │ + copy(**, ddiissppllaayy__nnaammee:: OOppttiioonnaall[[ssttrr]] == NNoonnee) → _p_r_a_w_._m_o_d_e_l_s_._M_u_l_t_i_r_e_d_d_i_t_# │ │ │ │ Copy this multireddit and return the new multireddit. │ │ │ │ Parameters: │ │ │ │ ddiissppllaayy__nnaammee – The display name for the copied multireddit. │ │ │ │ Reddit will generate the name field from this display name. │ │ │ │ When not provided the copy will use the same display name and │ │ │ │ name as this multireddit. │ │ │ │ To copy the multireddit bboe/test with a name of "testing": │ │ │ │ reddit.multireddit(redditor="bboe", name="test").copy │ │ │ │ (display_name="testing") │ │ │ │ delete()_# │ │ │ │ Delete this multireddit. │ │ │ │ For example, to delete multireddit bboe/test: │ │ │ │ reddit.multireddit(redditor="bboe", name="test").delete() │ │ │ │ - gilded(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_A_n_y]_# │ │ │ │ + gilded(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for gilded items. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get gilded items in r/test: │ │ │ │ for item in reddit.subreddit("test").gilded(): │ │ │ │ print(item.id) │ │ │ │ - hot(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_A_n_y]_# │ │ │ │ + hot(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for hot items. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").hot() │ │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").hot() │ │ │ │ reddit.redditor("spez").hot() │ │ │ │ reddit.redditor("spez").comments.hot() │ │ │ │ reddit.redditor("spez").submissions.hot() │ │ │ │ reddit.subreddit("all").hot() │ │ │ │ - new(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_A_n_y]_# │ │ │ │ + new(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for new items. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").new() │ │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").new() │ │ │ │ reddit.redditor("spez").new() │ │ │ │ reddit.redditor("spez").comments.new() │ │ │ │ reddit.redditor("spez").submissions.new() │ │ │ │ reddit.subreddit("all").new() │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_# │ │ │ │ Return an instance of cls from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - random_rising(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → │ │ │ │ - _I_t_e_r_a_t_o_r[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_# │ │ │ │ + random_rising(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → │ │ │ │ + Iterator[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for random rising submissions. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get random rising submissions for r/test: │ │ │ │ for submission in reddit.subreddit("test").random_rising(): │ │ │ │ print(submission.title) │ │ │ │ remove(ssuubbrreeddddiitt:: _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt)_# │ │ │ │ Remove a subreddit from this multireddit. │ │ │ │ Parameters: │ │ │ │ ssuubbrreeddddiitt – The subreddit to remove from this multi. │ │ │ │ For example, to remove r/test from multireddit bboe/test: │ │ │ │ subreddit = reddit.subreddit("test") │ │ │ │ reddit.multireddit(redditor="bboe", name="test").remove(subreddit) │ │ │ │ - rising(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ + rising(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ [_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for rising submissions. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get rising submissions for r/test: │ │ │ │ for submission in reddit.subreddit("test").rising(): │ │ │ │ print(submission.title) │ │ │ │ - ssttaattiicc sluggify(ttiittllee:: _ss_tt_rr)_# │ │ │ │ + ssttaattiicc sluggify(ttiittllee:: ssttrr)_# │ │ │ │ Return a slug version of the title. │ │ │ │ Parameters: │ │ │ │ ttiittllee – The title to make a slug of. │ │ │ │ Adapted from Reddit’s utils.py. │ │ │ │ stream() → _S_u_b_r_e_d_d_i_t_S_t_r_e_a_m_# │ │ │ │ Provide an instance of _S_u_b_r_e_d_d_i_t_S_t_r_e_a_m. │ │ │ │ Streams can be used to indefinitely retrieve new comments made to a │ │ │ │ @@ -319,34 +319,34 @@ │ │ │ │ Additionally, new submissions can be retrieved via the stream. In │ │ │ │ the following example all new submissions to the multireddit are │ │ │ │ fetched: │ │ │ │ for submission in reddit.multireddit( │ │ │ │ redditor="bboe", name="games" │ │ │ │ ).stream.submissions(): │ │ │ │ print(submission) │ │ │ │ - top(**, ttiimmee__ffiilltteerr:: _ss_tt_rr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, │ │ │ │ - _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r[_A_n_y]_# │ │ │ │ + top(**, ttiimmee__ffiilltteerr:: ssttrr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, │ │ │ │ + DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator[Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for top items. │ │ │ │ Parameters: │ │ │ │ ttiimmee__ffiilltteerr – Can be one of: "all", "day", "hour", "month", │ │ │ │ "week", or "year" (default: "all"). │ │ │ │ Raises: │ │ │ │ - _V_a_l_u_e_E_r_r_o_r if time_filter is invalid. │ │ │ │ + ValueError if time_filter is invalid. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").top(time_filter="week") │ │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").top │ │ │ │ (time_filter="day") │ │ │ │ reddit.redditor("spez").top(time_filter="month") │ │ │ │ reddit.redditor("spez").comments.top(time_filter="year") │ │ │ │ reddit.redditor("spez").submissions.top(time_filter="all") │ │ │ │ reddit.subreddit("all").top(time_filter="hour") │ │ │ │ - update(****uuppddaatteedd__sseettttiinnggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _LL_ii_ss_tt[[_UU_nn_ii_oo_nn[[_ss_tt_rr,, │ │ │ │ - _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]]]]])_# │ │ │ │ + update(****uuppddaatteedd__sseettttiinnggss:: UUnniioonn[[ssttrr,, LLiisstt[[UUnniioonn[[ssttrr,, │ │ │ │ + _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, DDiicctt[[ssttrr,, ssttrr]]]]]]]])_# │ │ │ │ Update this multireddit. │ │ │ │ Keyword arguments are passed for settings that should be updated. │ │ │ │ They can any of: │ │ │ │ Parameters: │ │ │ │ * ddiissppllaayy__nnaammee – The display name for this multireddit. │ │ │ │ Must be no longer than 50 characters. │ │ │ │ * ssuubbrreeddddiittss – Subreddits for this multireddit. │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/models/redditor.html │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ │ │ │ │ │
│ │ ││ │ │ │ │ │ Redditor#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Redditor(reddit: praw.Reddit, name: Optional[str] = None, fullname: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.Redditor(reddit: praw.Reddit, name: Optional[str] = None, fullname: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
A class representing the users of Reddit.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -467,15 +467,15 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The title of the user-subreddit.
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, name: Optional[str] = None, fullname: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, name: Optional[str] = None, fullname: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │Redditor
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
reddit – An instance of
Reddit
.
│ │ │ name – The name of the redditor.
│ │ │ fullname – The fullname of the redditor, starting with
t2_
.
│ │ │ @@ -512,23 +512,23 @@
│ │ │ print(comment.body.split("\\n", 1)[0][:79])
│ │ │
│ │ │
│ │ │
-
│ │ │
- │ │ │ -controversial(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +controversial(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for controversial items.-
│ │ │
- Parameters: │ │ │
time_filter – Can be one of:
│ │ │"all"
,"day"
,"hour"
, │ │ │"month"
,"week"
, or"year"
(default:"all"
).
│ │ │ - Raises: │ │ │ -
│ │ │ +ValueError
iftime_filter
is invalid. │ │ │
│ │ │ValueError
iftime_filter
is invalid.
Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ │ │ │ ││ │ │ │ │ │ │ │ │reddit.domain("imgur.com").controversial(time_filter="week") │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").controversial( │ │ │ @@ -554,15 +554,15 @@ │ │ │
See also
│ │ │ │ │ │-
│ │ │
- │ │ │ -downvoted(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │ +downvoted(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │
Return a
│ │ │ListingGenerator
for items the user has downvoted.-
│ │ │
- Returns: │ │ │
A
│ │ │ListingGenerator
object which yieldsComment
or │ │ │Submission
objects the user has downvoted.
│ │ │ - Raises: │ │ │ @@ -582,15 +582,15 @@ │ │ │ print(item.id) │ │ │
-
│ │ │
- │ │ │ -friend(*, note: str = None)# │ │ │ +friend(*, note: str = None)# │ │ │
Friend the
│ │ │Redditor
.-
│ │ │
- Parameters: │ │ │
note – A note to save along with the relationship. Requires Reddit Premium │ │ │ (default:
│ │ │None
).
│ │ │
- │ │ │ classmethod from_data(reddit, data)# │ │ │
Return an instance of
│ │ │Redditor
, orNone
fromdata
.
-
│ │ │
- │ │ │ -property fullname: str# │ │ │ +property fullname: str# │ │ │
Return the object’s fullname.
│ │ │A fullname is an object’s kind mapping like
│ │ │t3
followed by an underscore and │ │ │ the object’s base36 ID, e.g.,t1_c5s96e0
.
-
│ │ │
- │ │ │ -gild(*, months: int = 1)# │ │ │ +gild(*, months: int = 1)# │ │ │
Gild the
│ │ │Redditor
.-
│ │ │
- Parameters: │ │ │
months – Specifies the number of months to gild up to 36 (default:
│ │ │1
).
│ │ │
For example, to gild
│ │ │Redditor
u/spez for 1 month:│ │ ││ │ │reddit.redditor("spez").gild(months=1) │ │ │
-
│ │ │
- │ │ │ -gilded(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +gilded(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for gilded items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get gilded items in r/test:
│ │ ││ │ ││ │ │for item in reddit.subreddit("test").gilded(): │ │ │ print(item.id) │ │ │
-
│ │ │
- │ │ │ -gildings(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │ +gildings(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │
Return a
│ │ │ListingGenerator
for items the user has gilded.-
│ │ │
- Returns: │ │ │
A
│ │ │ListingGenerator
object which yieldsComment
or │ │ │Submission
objects the user has gilded.
│ │ │ - Raises: │ │ │ @@ -690,15 +690,15 @@ │ │ │ print(item.id) │ │ │ │ │ │ │ │ │
-
│ │ │ hidden(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] #
│ │ │
Return a
│ │ │ListingGenerator
for items the user has hidden.-
│ │ │
- Returns: │ │ │
A
│ │ │ListingGenerator
object which yieldsComment
or │ │ │Submission
objects the user has hid.
│ │ │ - Raises: │ │ │ @@ -718,15 +718,15 @@ │ │ │ print(item.id) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -hot(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +hot(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for hot items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").hot() │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").hot() │ │ │ reddit.redditor("spez").hot() │ │ │ @@ -735,15 +735,15 @@ │ │ │ reddit.subreddit("all").hot() │ │ │
-
│ │ │
- │ │ │ -message(*, from_subreddit: Optional[Union[praw.models.Subreddit, str]] = None, message: str, subject: str)# │ │ │ +message(*, from_subreddit: Optional[Union[praw.models.Subreddit, str]] = None, message: str, subject: str)# │ │ │
Send a message to a
│ │ │Redditor
or aSubreddit
’s moderators (modmail).-
│ │ │
- Parameters: │ │ │
-
│ │ │
from_subreddit –
A
│ │ │ @@ -772,15 +772,15 @@ │ │ │Subreddit
instance or string to send the │ │ │ message from. When provided, messages are sent from the subreddit rather │ │ │ than from the authenticated user.│ │ ││ │ │reddit.subreddit("test").message(subject="TEST", message="test PM from PRAW") │ │ │
-
│ │ │
- │ │ │ -moderated() List[praw.models.Subreddit] # │ │ │ +moderated() List[praw.models.Subreddit] # │ │ │
Return a list of the redditor’s moderated subreddits.
│ │ │-
│ │ │
- Returns: │ │ │
A list of
│ │ │Subreddit
objects. Return[]
if the redditor │ │ │ has no moderated subreddits.
│ │ │ - Raises: │ │ │ @@ -818,25 +818,25 @@ │ │ │
See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -multireddits() List[praw.models.Multireddit] # │ │ │ +multireddits() List[praw.models.Multireddit] # │ │ │
Return a list of the redditor’s public multireddits.
│ │ │For example, to to get
│ │ │Redditor
u/spez’s multireddits:│ │ ││ │ │multireddits = reddit.redditor("spez").multireddits() │ │ │
-
│ │ │
- │ │ │ -new(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +new(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for new items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").new() │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").new() │ │ │ reddit.redditor("spez").new() │ │ │ @@ -863,29 +863,29 @@ │ │ │ print(f"{note.label}: {note.note}") │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -saved(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │ +saved(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │
Return a
│ │ │ListingGenerator
for items the user has saved.-
│ │ │
- Returns: │ │ │
A
│ │ │ListingGenerator
object which yieldsComment
or │ │ │Submission
objects the user has saved.
│ │ │ - Raises: │ │ │ @@ -935,23 +935,23 @@ │ │ │ print(submission.title) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -top(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +top(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for top items.-
│ │ │
- Parameters: │ │ │
time_filter – Can be one of:
│ │ │"all"
,"day"
,"hour"
, │ │ │"month"
,"week"
, or"year"
(default:"all"
).
│ │ │ - Raises: │ │ │ -
│ │ │ +ValueError
iftime_filter
is invalid. │ │ │
│ │ │ValueError
iftime_filter
is invalid.
Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").top(time_filter="week") │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").top(time_filter="day") │ │ │ @@ -961,15 +961,15 @@ │ │ │ reddit.subreddit("all").top(time_filter="hour") │ │ │
-
│ │ │
- │ │ │ -trophies() List[praw.models.Trophy] # │ │ │ +trophies() List[praw.models.Trophy] # │ │ │
Return a list of the redditor’s trophies.
│ │ │-
│ │ │
- Returns: │ │ │
A list of
│ │ │Trophy
objects. Return[]
if the redditor has │ │ │ no trophies.
│ │ │ - Raises: │ │ │ @@ -1037,15 +1037,15 @@ │ │ │
│ │ ││ │ │reddit.redditor("spez").unfriend() │ │ │
-
│ │ │
- │ │ │ -upvoted(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │ +upvoted(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Union[praw.models.Comment, praw.models.Submission]] # │ │ │
Return a
│ │ │ListingGenerator
for items the user has upvoted.-
│ │ │
- Returns: │ │ │
A
│ │ │ListingGenerator
object which yieldsComment
or │ │ │Submission
objects the user has upvoted.
│ │ │ - Raises: │ │ │ ├── html2text {} │ │ │ │ @@ -161,16 +161,16 @@ │ │ │ │ * _R_e_f_e_r_e_n_c_e_s │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ RReeddddiittoorr_## ************ │ │ │ │ - ccllaassss praw.models.Redditor(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, nnaammee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, │ │ │ │ - ffuullllnnaammee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_# │ │ │ │ + ccllaassss praw.models.Redditor(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, nnaammee:: OOppttiioonnaall[[ssttrr]] == NNoonnee, │ │ │ │ + ffuullllnnaammee:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_# │ │ │ │ A class representing the users of Reddit. │ │ │ │ TTyyppiiccaall AAttttrriibbuutteess │ │ │ │ Note │ │ │ │ This table describes attributes that typically belong to objects of this │ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via │ │ │ │ the API. Since those attributes are subject to change on Reddit’s end, │ │ │ │ PRAW makes no effort to document any new/removed/changed attributes, │ │ │ │ @@ -217,16 +217,16 @@ │ │ │ │ subreddit["over_18"] Whether or not the user-subreddit is │ │ │ │ NSFW. │ │ │ │ subreddit["public_description"] The public description of the user- │ │ │ │ subreddit. │ │ │ │ subreddit["subscribers"] The number of users subscribed to the │ │ │ │ user-subreddit. │ │ │ │ subreddit["title"] The title of the user-subreddit. │ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, nnaammee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ffuullllnnaammee:: │ │ │ │ - _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_# │ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, nnaammee:: OOppttiioonnaall[[ssttrr]] == NNoonnee, ffuullllnnaammee:: │ │ │ │ + OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_# │ │ │ │ Initialize a _R_e_d_d_i_t_o_r instance. │ │ │ │ Parameters: │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ * nnaammee – The name of the redditor. │ │ │ │ * ffuullllnnaammee – The fullname of the redditor, starting with │ │ │ │ t2_. │ │ │ │ Exactly one of name, fullname or _data must be provided. │ │ │ │ @@ -241,22 +241,22 @@ │ │ │ │ _t_r_u_s_t_(_) │ │ │ │ comments() → _S_u_b_L_i_s_t_i_n_g_# │ │ │ │ Provide an instance of _S_u_b_L_i_s_t_i_n_g for comment access. │ │ │ │ For example, to output the first line of all new comments by u/spez │ │ │ │ try: │ │ │ │ for comment in reddit.redditor("spez").comments.new(limit=None): │ │ │ │ print(comment.body.split("\\n", 1)[0][:79]) │ │ │ │ - controversial(**, ttiimmee__ffiilltteerr:: _ss_tt_rr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn │ │ │ │ - [[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r[_A_n_y]_# │ │ │ │ + controversial(**, ttiimmee__ffiilltteerr:: ssttrr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn │ │ │ │ + [[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator[Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for controversial items. │ │ │ │ Parameters: │ │ │ │ ttiimmee__ffiilltteerr – Can be one of: "all", "day", "hour", "month", │ │ │ │ "week", or "year" (default: "all"). │ │ │ │ Raises: │ │ │ │ - _V_a_l_u_e_E_r_r_o_r if time_filter is invalid. │ │ │ │ + ValueError if time_filter is invalid. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").controversial(time_filter="week") │ │ │ │ reddit.multireddit(redditor="samuraisam", │ │ │ │ name="programming").controversial( │ │ │ │ time_filter="day" │ │ │ │ @@ -268,16 +268,16 @@ │ │ │ │ reddit.subreddit("all").controversial(time_filter="hour") │ │ │ │ distrust()_# │ │ │ │ Remove the _R_e_d_d_i_t_o_r from your whitelist of trusted users. │ │ │ │ For example, to remove _R_e_d_d_i_t_o_r u/spez from your whitelist: │ │ │ │ reddit.redditor("spez").distrust() │ │ │ │ See also │ │ │ │ _t_r_u_s_t_(_) │ │ │ │ - downvoted(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → │ │ │ │ - _I_t_e_r_a_t_o_r[_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ + downvoted(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → │ │ │ │ + Iterator[Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for items the user has downvoted. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _C_o_m_m_e_n_t or _S_u_b_m_i_s_s_i_o_n │ │ │ │ objects the user has downvoted. │ │ │ │ Raises: │ │ │ │ prawcore.Forbidden if the user is not authorized to access │ │ │ │ the list. │ │ │ │ @@ -286,15 +286,15 @@ │ │ │ │ may not occur until sometime after this function has │ │ │ │ returned. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get all downvoted items of the authenticated user: │ │ │ │ for item in reddit.user.me().downvoted(): │ │ │ │ print(item.id) │ │ │ │ - friend(**, nnoottee:: _ss_tt_rr == NNoonnee)_# │ │ │ │ + friend(**, nnoottee:: ssttrr == NNoonnee)_# │ │ │ │ Friend the _R_e_d_d_i_t_o_r. │ │ │ │ Parameters: │ │ │ │ nnoottee – A note to save along with the relationship. Requires │ │ │ │ Reddit Premium (default: None). │ │ │ │ Calling this method subsequent times will update the note. │ │ │ │ For example, to friend u/spez: │ │ │ │ reddit.redditor("spez").friend() │ │ │ │ @@ -306,35 +306,35 @@ │ │ │ │ A _R_e_d_d_i_t_o_r instance with fields date, id, and possibly note │ │ │ │ if the authenticated user has Reddit Premium. │ │ │ │ For example, to get the friendship information of _R_e_d_d_i_t_o_r u/spez: │ │ │ │ info = reddit.redditor("spez").friend_info │ │ │ │ friend_data = info.date │ │ │ │ ccllaassssmmeetthhoodd from_data(rreeddddiitt, ddaattaa)_# │ │ │ │ Return an instance of _R_e_d_d_i_t_o_r, or None from data. │ │ │ │ - pprrooppeerrttyy fullname:: _ss_tt_rr_# │ │ │ │ + pprrooppeerrttyy fullname:: ssttrr_# │ │ │ │ Return the object’s fullname. │ │ │ │ A fullname is an object’s kind mapping like t3 followed by an │ │ │ │ underscore and the object’s base36 ID, e.g., t1_c5s96e0. │ │ │ │ - gild(**, mmoonntthhss:: _ii_nn_tt == 11)_# │ │ │ │ + gild(**, mmoonntthhss:: iinntt == 11)_# │ │ │ │ Gild the _R_e_d_d_i_t_o_r. │ │ │ │ Parameters: │ │ │ │ mmoonntthhss – Specifies the number of months to gild up to 36 │ │ │ │ (default: 1). │ │ │ │ For example, to gild _R_e_d_d_i_t_o_r u/spez for 1 month: │ │ │ │ reddit.redditor("spez").gild(months=1) │ │ │ │ - gilded(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_A_n_y]_# │ │ │ │ + gilded(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for gilded items. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get gilded items in r/test: │ │ │ │ for item in reddit.subreddit("test").gilded(): │ │ │ │ print(item.id) │ │ │ │ - gildings(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → │ │ │ │ - _I_t_e_r_a_t_o_r[_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ + gildings(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → │ │ │ │ + Iterator[Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for items the user has gilded. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _C_o_m_m_e_n_t or _S_u_b_m_i_s_s_i_o_n │ │ │ │ objects the user has gilded. │ │ │ │ Raises: │ │ │ │ prawcore.Forbidden if the user is not authorized to access │ │ │ │ the list. │ │ │ │ @@ -343,16 +343,16 @@ │ │ │ │ may not occur until sometime after this function has │ │ │ │ returned. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get all gilded items of the authenticated user: │ │ │ │ for item in reddit.user.me().gildings(): │ │ │ │ print(item.id) │ │ │ │ - hidden(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ + hidden(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for items the user has hidden. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _C_o_m_m_e_n_t or _S_u_b_m_i_s_s_i_o_n │ │ │ │ objects the user has hid. │ │ │ │ Raises: │ │ │ │ prawcore.Forbidden if the user is not authorized to access │ │ │ │ the list. │ │ │ │ @@ -361,41 +361,41 @@ │ │ │ │ may not occur until sometime after this function has │ │ │ │ returned. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ For example, to get all hidden items of the authenticated user: │ │ │ │ for item in reddit.user.me().hidden(): │ │ │ │ print(item.id) │ │ │ │ - hot(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_A_n_y]_# │ │ │ │ + hot(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for hot items. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").hot() │ │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").hot() │ │ │ │ reddit.redditor("spez").hot() │ │ │ │ reddit.redditor("spez").comments.hot() │ │ │ │ reddit.redditor("spez").submissions.hot() │ │ │ │ reddit.subreddit("all").hot() │ │ │ │ - message(**, ffrroomm__ssuubbrreeddddiitt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, _ss_tt_rr]]]] │ │ │ │ - == NNoonnee, mmeessssaaggee:: _ss_tt_rr, ssuubbjjeecctt:: _ss_tt_rr)_# │ │ │ │ + message(**, ffrroomm__ssuubbrreeddddiitt:: OOppttiioonnaall[[UUnniioonn[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, ssttrr]]]] │ │ │ │ + == NNoonnee, mmeessssaaggee:: ssttrr, ssuubbjjeecctt:: ssttrr)_# │ │ │ │ Send a message to a _R_e_d_d_i_t_o_r or a _S_u_b_r_e_d_d_i_t’s moderators (modmail). │ │ │ │ For example, to send a private message to u/spez, try: │ │ │ │ reddit.redditor("spez").message(subject="TEST", message="test │ │ │ │ message from PRAW") │ │ │ │ To send a message to u/spez from the moderators of r/test try: │ │ │ │ reddit.redditor("spez").message( │ │ │ │ subject="TEST", message="test message from r/test", │ │ │ │ from_subreddit="test" │ │ │ │ ) │ │ │ │ To send a message to the moderators of r/test, try: │ │ │ │ reddit.subreddit("test").message(subject="TEST", message="test PM │ │ │ │ from PRAW") │ │ │ │ - moderated() → _L_i_s_t[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_r_e_d_d_i_t]_# │ │ │ │ + moderated() → List[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_r_e_d_d_i_t]_# │ │ │ │ Return a list of the redditor’s moderated subreddits. │ │ │ │ Returns: │ │ │ │ A list of _S_u_b_r_e_d_d_i_t objects. Return [] if the redditor has no │ │ │ │ moderated subreddits. │ │ │ │ Raises: │ │ │ │ prawcore.ServerError in certain circumstances. See the note │ │ │ │ below. │ │ │ │ @@ -417,20 +417,20 @@ │ │ │ │ a prawcore.ServerError exception. │ │ │ │ When used in read-only mode, this method does not retrieve │ │ │ │ information about subreddits that require certain special │ │ │ │ permissions to access, e.g., private subreddits and premium-only │ │ │ │ subreddits. │ │ │ │ See also │ │ │ │ _U_s_e_r_._m_o_d_e_r_a_t_o_r___s_u_b_r_e_d_d_i_t_s_(_) │ │ │ │ - multireddits() → _L_i_s_t[_p_r_a_w_._m_o_d_e_l_s_._M_u_l_t_i_r_e_d_d_i_t]_# │ │ │ │ + multireddits() → List[_p_r_a_w_._m_o_d_e_l_s_._M_u_l_t_i_r_e_d_d_i_t]_# │ │ │ │ Return a list of the redditor’s public multireddits. │ │ │ │ For example, to to get _R_e_d_d_i_t_o_r u/spez’s multireddits: │ │ │ │ multireddits = reddit.redditor("spez").multireddits() │ │ │ │ - new(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_A_n_y]_# │ │ │ │ + new(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for new items. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").new() │ │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").new() │ │ │ │ reddit.redditor("spez").new() │ │ │ │ @@ -446,21 +446,21 @@ │ │ │ │ subreddit(s). │ │ │ │ For example, all the notes for u/spez in r/test can be iterated │ │ │ │ through like so: │ │ │ │ redditor = reddit.redditor("spez") │ │ │ │ │ │ │ │ for note in redditor.notes.subreddits("test"): │ │ │ │ print(f"{note.label}: {note.note}") │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_# │ │ │ │ Return an instance of cls from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - saved(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ + saved(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for items the user has saved. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _C_o_m_m_e_n_t or _S_u_b_m_i_s_s_i_o_n │ │ │ │ objects the user has saved. │ │ │ │ Raises: │ │ │ │ prawcore.Forbidden if the user is not authorized to access │ │ │ │ the list. │ │ │ │ @@ -487,33 +487,33 @@ │ │ │ │ submissions() → _S_u_b_L_i_s_t_i_n_g_# │ │ │ │ Provide an instance of _S_u_b_L_i_s_t_i_n_g for submission access. │ │ │ │ For example, to output the title’s of top 100 of all time │ │ │ │ submissions for u/spez try: │ │ │ │ for submission in reddit.redditor("spez").submissions.top │ │ │ │ (time_filter="all"): │ │ │ │ print(submission.title) │ │ │ │ - top(**, ttiimmee__ffiilltteerr:: _ss_tt_rr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, │ │ │ │ - _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r[_A_n_y]_# │ │ │ │ + top(**, ttiimmee__ffiilltteerr:: ssttrr == ''aallll'', ****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, │ │ │ │ + DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator[Any]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for top items. │ │ │ │ Parameters: │ │ │ │ ttiimmee__ffiilltteerr – Can be one of: "all", "day", "hour", "month", │ │ │ │ "week", or "year" (default: "all"). │ │ │ │ Raises: │ │ │ │ - _V_a_l_u_e_E_r_r_o_r if time_filter is invalid. │ │ │ │ + ValueError if time_filter is invalid. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ This method can be used like: │ │ │ │ reddit.domain("imgur.com").top(time_filter="week") │ │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").top │ │ │ │ (time_filter="day") │ │ │ │ reddit.redditor("spez").top(time_filter="month") │ │ │ │ reddit.redditor("spez").comments.top(time_filter="year") │ │ │ │ reddit.redditor("spez").submissions.top(time_filter="all") │ │ │ │ reddit.subreddit("all").top(time_filter="hour") │ │ │ │ - trophies() → _L_i_s_t[_p_r_a_w_._m_o_d_e_l_s_._T_r_o_p_h_y]_# │ │ │ │ + trophies() → List[_p_r_a_w_._m_o_d_e_l_s_._T_r_o_p_h_y]_# │ │ │ │ Return a list of the redditor’s trophies. │ │ │ │ Returns: │ │ │ │ A list of _T_r_o_p_h_y objects. Return [] if the redditor has no │ │ │ │ trophies. │ │ │ │ Raises: │ │ │ │ _R_e_d_d_i_t_A_P_I_E_x_c_e_p_t_i_o_n if the redditor doesn’t exist. │ │ │ │ Usage: │ │ │ │ @@ -546,16 +546,16 @@ │ │ │ │ Unblock the _R_e_d_d_i_t_o_r. │ │ │ │ For example, to unblock _R_e_d_d_i_t_o_r u/spez: │ │ │ │ reddit.redditor("spez").unblock() │ │ │ │ unfriend()_# │ │ │ │ Unfriend the _R_e_d_d_i_t_o_r. │ │ │ │ For example, to unfriend _R_e_d_d_i_t_o_r u/spez: │ │ │ │ reddit.redditor("spez").unfriend() │ │ │ │ - upvoted(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → _I_t_e_r_a_t_o_r │ │ │ │ - [_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ + upvoted(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → Iterator │ │ │ │ + [Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for items the user has upvoted. │ │ │ │ Returns: │ │ │ │ A _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r object which yields _C_o_m_m_e_n_t or _S_u_b_m_i_s_s_i_o_n │ │ │ │ objects the user has upvoted. │ │ │ │ Raises: │ │ │ │ prawcore.Forbidden if the user is not authorized to access │ │ │ │ the list. │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/models/submission.html │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ │ │ │ │ │
- │ │ │ -class praw.models.Submission(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.Submission(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
A class for submissions to Reddit.
│ │ │Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -473,15 +473,15 @@ │ │ │ selfpost.
│ │ │ │ │ │ │ │ │ │ │ │-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, id: Optional[str] = None, url: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │Submission
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
reddit – An instance of
Reddit
.
│ │ │ id – A reddit base36 submission ID, e.g.,
"2gmzqe"
.
│ │ │ url – A URL supported by
id_from_url()
.
│ │ │ @@ -489,15 +489,15 @@
│ │ │
│ │ │
Either
│ │ │id
orurl
can be provided, but not both.
-
│ │ │
- │ │ │ -_edit_experimental(body: str, *, preserve_inline_media=False, inline_media: Optional[Dict[str, praw.models.InlineMedia]] = None) praw.models.Submission # │ │ │ +_edit_experimental(body: str, *, preserve_inline_media=False, inline_media: Optional[Dict[str, praw.models.InlineMedia]] = None) praw.models.Submission # │ │ │
Replace the body of the object with
│ │ │body
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
body – The Markdown formatted content for the updated object.
│ │ │ preserve_inline_media –
Attempt to preserve inline media in
│ │ │body
.│ │ │ @@ -548,15 +548,15 @@ │ │ │ print(submission.rtjson) │ │ ││ │ │ │ │ │
-
│ │ │
- │ │ │ -award(*, gild_type: str = 'gid_2', is_anonymous: bool = True, message: str = None) dict # │ │ │ +award(*, gild_type: str = 'gid_2', is_anonymous: bool = True, message: str = None) dict # │ │ │
Award the author of the item.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
gild_type – Type of award to give. See table below for currently know │ │ │ global award types.
│ │ │ is_anonymous – If
True
, the authenticated user’s username will not be │ │ │ @@ -679,15 +679,15 @@ │ │ │ │ │ │See Extracting comments with PRAW for more on working with a │ │ │
│ │ │CommentForest
.
-
│ │ │
- │ │ │ -crosspost(subreddit: praw.models.Subreddit, *, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, send_replies: bool = True, spoiler: bool = False, title: Optional[str] = None) praw.models.Submission # │ │ │ +crosspost(subreddit: praw.models.Subreddit, *, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, send_replies: bool = True, spoiler: bool = False, title: Optional[str] = None) praw.models.Submission # │ │ │
Crosspost the submission to a subreddit.
│ │ ││ │ ││ │ │Note
│ │ │Be aware you have to be subscribed to the target subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │ @@ -777,15 +777,15 @@ │ │ │
See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -duplicates(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │ +duplicates(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for the submission’s duplicates.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.Example usage:
│ │ ││ │ │ │ │ ││ │ │ │ │ │ │ │ │submission = reddit.submission("5or86n") │ │ │ │ │ │ for duplicate in submission.duplicates(): │ │ │ @@ -797,15 +797,15 @@ │ │ │
See also
│ │ │ │ │ │-
│ │ │
- │ │ │ -edit(body: str) Union[praw.models.Comment, praw.models.Submission] # │ │ │ +edit(body: str) Union[praw.models.Comment, praw.models.Submission] # │ │ │
Replace the body of the object with
│ │ │body
.-
│ │ │
- Parameters: │ │ │
body – The Markdown formatted content for the updated object.
│ │ │
│ │ │ - Returns: │ │ │
The current instance after updating its attributes.
│ │ │ @@ -853,29 +853,29 @@ │ │ │ submission.flair.select(template_id, text="my custom value") │ │ │
-
│ │ │
- │ │ │ -property fullname: str# │ │ │ +property fullname: str# │ │ │
Return the object’s fullname.
│ │ │A fullname is an object’s kind mapping like
│ │ │t3
followed by an underscore and │ │ │ the object’s base36 ID, e.g.,t1_c5s96e0
.
-
│ │ │
- │ │ │ -gild() dict # │ │ │ +gild() dict # │ │ │
Alias for
│ │ │award()
to maintain backwards compatibility.
-
│ │ │
- │ │ │ -hide(*, other_submissions: Optional[List[praw.models.Submission]] = None)# │ │ │ +hide(*, other_submissions: Optional[List[praw.models.Submission]] = None)# │ │ │
Hide
│ │ │Submission
.-
│ │ │
- Parameters: │ │ │
other_submissions – When provided, additionally hide this list of │ │ │
│ │ │Submission
instances as part of a single request (default: │ │ │None
).
│ │ │ @@ -889,15 +889,15 @@
│ │ │
See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -static id_from_url(url: str) str # │ │ │ +static id_from_url(url: str) str # │ │ │
Return the ID contained within a submission URL.
│ │ │-
│ │ │
- Parameters: │ │ │
url –
A url to a submission in one of the following formats (http urls │ │ │ will also work):
│ │ │-
│ │ │
"https://redd.it/2gmzqe"
│ │ │ @@ -934,29 +934,29 @@
│ │ │ submission.mod.approve()
│ │ │
│ │ │
│ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -reply(body: str) Optional[Union[praw.models.Comment, praw.models.Message]] # │ │ │ +reply(body: str) Optional[Union[praw.models.Comment, praw.models.Message]] # │ │ │
Reply to the object.
│ │ │-
│ │ │
- Parameters: │ │ │
body – The Markdown formatted content for a comment.
│ │ │
│ │ │ - Returns: │ │ │
A
Comment
orMessage
object for the newly created │ │ │ @@ -979,15 +979,15 @@ │ │ │ comment.reply("reply") │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -report(reason: str)# │ │ │ +report(reason: str)# │ │ │
Report this object to the moderators of its subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
reason – The reason for reporting.
│ │ │
│ │ │ - Raises: │ │ │
RedditAPIException
ifreason
is longer than 100 │ │ │ @@ -1002,15 +1002,15 @@ │ │ │ comment.report("report reason") │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -save(*, category: Optional[str] = None)# │ │ │ +save(*, category: Optional[str] = None)# │ │ │
Save the object.
│ │ │-
│ │ │
- Parameters: │ │ │
category – The category to save to. If the authenticated user does not │ │ │ have Reddit Premium this value is ignored by Reddit (default:
│ │ │None
).
│ │ │
See also
│ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -property shortlink: str# │ │ │ +property shortlink: str# │ │ │
Return a shortlink to the submission.
│ │ │For example, https://redd.it/eorhm is a shortlink for │ │ │ https://www.reddit.com/r/announcements/comments/eorhm/reddit_30_less_typing/.
│ │ │
-
│ │ │
- │ │ │ -unhide(*, other_submissions: Optional[List[praw.models.Submission]] = None)# │ │ │ +unhide(*, other_submissions: Optional[List[praw.models.Submission]] = None)# │ │ │
Unhide
│ │ │Submission
.-
│ │ │
- Parameters: │ │ │
other_submissions – When provided, additionally unhide this list of │ │ │
│ │ │Submission
instances as part of a single request (default: │ │ │None
).
│ │ │ ├── html2text {}
│ │ │ │ @@ -161,16 +161,16 @@
│ │ │ │ * _R_e_f_e_r_e_n_c_e_s
│ │ │ │ * _S_p_o_n_s_o_r_s
│ │ │ │ * _I_n_d_e_x
│ │ │ │ _B_a_c_k_ _t_o_ _t_o_p
│ │ │ │ Toggle Light / Dark / Auto color theme
│ │ │ │ Toggle table of contents sidebar
│ │ │ │ ************ SSuubbmmiissssiioonn_## ************
│ │ │ │ - ccllaassss praw.models.Submission(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee,
│ │ │ │ - uurrll:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_#
│ │ │ │ + ccllaassss praw.models.Submission(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee,
│ │ │ │ + uurrll:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_#
│ │ │ │ A class for submissions to Reddit.
│ │ │ │ TTyyppiiccaall AAttttrriibbuutteess
│ │ │ │ Note
│ │ │ │ This table describes attributes that typically belong to objects of this
│ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via
│ │ │ │ the API. Since those attributes are subject to change on Reddit’s end,
│ │ │ │ PRAW makes no effort to document any new/removed/changed attributes,
│ │ │ │ @@ -215,24 +215,24 @@
│ │ │ │ stickied Whether or not the submission is stickied.
│ │ │ │ subreddit Provides an instance of _S_u_b_r_e_d_d_i_t.
│ │ │ │ title The title of the submission.
│ │ │ │ upvote_ratio The percentage of upvotes from all votes on the
│ │ │ │ submission.
│ │ │ │ url The URL the submission links to, or the permalink
│ │ │ │ if a selfpost.
│ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, uurrll:: _OO_pp_tt_ii_oo_nn_aa_ll
│ │ │ │ - [[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_#
│ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, uurrll:: OOppttiioonnaall
│ │ │ │ + [[ssttrr]] == NNoonnee, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_#
│ │ │ │ Initialize a _S_u_b_m_i_s_s_i_o_n instance.
│ │ │ │ Parameters:
│ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t.
│ │ │ │ * iidd – A reddit base36 submission ID, e.g., "2gmzqe".
│ │ │ │ * uurrll – A URL supported by _i_d___f_r_o_m___u_r_l_(_).
│ │ │ │ Either id or url can be provided, but not both.
│ │ │ │ - _edit_experimental(bbooddyy:: _ss_tt_rr, **, pprreesseerrvvee__iinnlliinnee__mmeeddiiaa==FFaallssee,
│ │ │ │ - iinnlliinnee__mmeeddiiaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._II_nn_ll_ii_nn_ee_MM_ee_dd_ii_aa]]]] == NNoonnee) →
│ │ │ │ + _edit_experimental(bbooddyy:: ssttrr, **, pprreesseerrvvee__iinnlliinnee__mmeeddiiaa==FFaallssee,
│ │ │ │ + iinnlliinnee__mmeeddiiaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._II_nn_ll_ii_nn_ee_MM_ee_dd_ii_aa]]]] == NNoonnee) →
│ │ │ │ _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n_#
│ │ │ │ Replace the body of the object with body.
│ │ │ │ Returns:
│ │ │ │ The current instance after updating its attributes.
│ │ │ │ Example usage:
│ │ │ │ from praw.models import InlineGif, InlineImage, InlineVideo
│ │ │ │
│ │ │ │ @@ -254,16 +254,16 @@
│ │ │ │ * kkeeyy – The key of the fetch parameter.
│ │ │ │ * vvaalluuee – The value of the fetch parameter.
│ │ │ │ For example, to fetch a submission with the rtjson attribute
│ │ │ │ populated:
│ │ │ │ submission = reddit.submission("mcqjl8")
│ │ │ │ submission.add_fetch_param("rtj", "all")
│ │ │ │ print(submission.rtjson)
│ │ │ │ - award(**, ggiilldd__ttyyppee:: _ss_tt_rr == ''ggiidd__22'', iiss__aannoonnyymmoouuss:: _bb_oo_oo_ll == TTrruuee, mmeessssaaggee::
│ │ │ │ - _ss_tt_rr == NNoonnee) → _d_i_c_t_#
│ │ │ │ + award(**, ggiilldd__ttyyppee:: ssttrr == ''ggiidd__22'', iiss__aannoonnyymmoouuss:: bbooooll == TTrruuee, mmeessssaaggee::
│ │ │ │ + ssttrr == NNoonnee) → dict_#
│ │ │ │ Award the author of the item.
│ │ │ │ Warning
│ │ │ │ Requires the authenticated user to own Reddit Coins. Calling this
│ │ │ │ method will consume Reddit Coins.
│ │ │ │ To award the gold award anonymously do:
│ │ │ │ comment = reddit.comment("dkk4qjd")
│ │ │ │ comment.award()
│ │ │ │ @@ -304,17 +304,17 @@
│ │ │ │ submission.comment_sort = "new"
│ │ │ │ comments = submission.comments.list()
│ │ │ │ Note
│ │ │ │ The appropriate values for "comment_sort" include "confidence",
│ │ │ │ "controversial", "new", "old", "q&a", and "top"
│ │ │ │ See _E_x_t_r_a_c_t_i_n_g_ _c_o_m_m_e_n_t_s_ _w_i_t_h_ _P_R_A_W for more on working with a
│ │ │ │ _C_o_m_m_e_n_t_F_o_r_e_s_t.
│ │ │ │ - crosspost(ssuubbrreeddddiitt:: _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt, **, ffllaaiirr__iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]]
│ │ │ │ - == NNoonnee, ffllaaiirr__tteexxtt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, nnssffww:: _bb_oo_oo_ll == FFaallssee,
│ │ │ │ - sseenndd__rreepplliieess:: _bb_oo_oo_ll == TTrruuee, ssppooiilleerr:: _bb_oo_oo_ll == FFaallssee, ttiittllee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]]
│ │ │ │ + crosspost(ssuubbrreeddddiitt:: _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt, **, ffllaaiirr__iidd:: OOppttiioonnaall[[ssttrr]]
│ │ │ │ + == NNoonnee, ffllaaiirr__tteexxtt:: OOppttiioonnaall[[ssttrr]] == NNoonnee, nnssffww:: bbooooll == FFaallssee,
│ │ │ │ + sseenndd__rreepplliieess:: bbooooll == TTrruuee, ssppooiilleerr:: bbooooll == FFaallssee, ttiittllee:: OOppttiioonnaall[[ssttrr]]
│ │ │ │ == NNoonnee) → _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n_#
│ │ │ │ Crosspost the submission to a subreddit.
│ │ │ │ Note
│ │ │ │ Be aware you have to be subscribed to the target subreddit.
│ │ │ │ Parameters:
│ │ │ │ * ssuubbrreeddddiitt – Name of the subreddit or _S_u_b_r_e_d_d_i_t object
│ │ │ │ to crosspost into.
│ │ │ │ @@ -369,28 +369,28 @@
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │ submission.downvote()
│ │ │ │
│ │ │ │ comment = reddit.comment("dxolpyc")
│ │ │ │ comment.downvote()
│ │ │ │ See also
│ │ │ │ _u_p_v_o_t_e_(_)
│ │ │ │ - duplicates(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) →
│ │ │ │ - _I_t_e_r_a_t_o_r[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_#
│ │ │ │ + duplicates(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) →
│ │ │ │ + Iterator[_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_#
│ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for the submission’s duplicates.
│ │ │ │ Additional keyword arguments are passed in the initialization of
│ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r.
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │
│ │ │ │ for duplicate in submission.duplicates():
│ │ │ │ # process each duplicate
│ │ │ │ ...
│ │ │ │ See also
│ │ │ │ _u_p_v_o_t_e_(_)
│ │ │ │ - edit(bbooddyy:: _ss_tt_rr) → _U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_#
│ │ │ │ + edit(bbooddyy:: ssttrr) → Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t, _p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_#
│ │ │ │ Replace the body of the object with body.
│ │ │ │ Parameters:
│ │ │ │ bbooddyy – The Markdown formatted content for the updated object.
│ │ │ │ Returns:
│ │ │ │ The current instance after updating its attributes.
│ │ │ │ Example usage:
│ │ │ │ comment = reddit.comment("dkk4qjd")
│ │ │ │ @@ -416,53 +416,53 @@
│ │ │ │ _f_l_a_i_r_(_).
│ │ │ │ For example, to select an arbitrary editable flair text (assuming
│ │ │ │ there is one) and set a custom value try:
│ │ │ │ choices = submission.flair.choices()
│ │ │ │ template_id = next(x for x in choices if x["flair_text_editable"])
│ │ │ │ ["flair_template_id"]
│ │ │ │ submission.flair.select(template_id, text="my custom value")
│ │ │ │ - pprrooppeerrttyy fullname:: _ss_tt_rr_#
│ │ │ │ + pprrooppeerrttyy fullname:: ssttrr_#
│ │ │ │ Return the object’s fullname.
│ │ │ │ A fullname is an object’s kind mapping like t3 followed by an
│ │ │ │ underscore and the object’s base36 ID, e.g., t1_c5s96e0.
│ │ │ │ - gild() → _d_i_c_t_#
│ │ │ │ + gild() → dict_#
│ │ │ │ Alias for _a_w_a_r_d_(_) to maintain backwards compatibility.
│ │ │ │ - hide(**, ootthheerr__ssuubbmmiissssiioonnss:: _OO_pp_tt_ii_oo_nn_aa_ll[[_LL_ii_ss_tt[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_mm_ii_ss_ss_ii_oo_nn]]]] ==
│ │ │ │ + hide(**, ootthheerr__ssuubbmmiissssiioonnss:: OOppttiioonnaall[[LLiisstt[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_mm_ii_ss_ss_ii_oo_nn]]]] ==
│ │ │ │ NNoonnee)_#
│ │ │ │ Hide _S_u_b_m_i_s_s_i_o_n.
│ │ │ │ Parameters:
│ │ │ │ ootthheerr__ssuubbmmiissssiioonnss – When provided, additionally hide this
│ │ │ │ list of _S_u_b_m_i_s_s_i_o_n instances as part of a single request
│ │ │ │ (default: None).
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │ submission.hide()
│ │ │ │ See also
│ │ │ │ _u_n_h_i_d_e_(_)
│ │ │ │ - ssttaattiicc id_from_url(uurrll:: _ss_tt_rr) → _s_t_r_#
│ │ │ │ + ssttaattiicc id_from_url(uurrll:: ssttrr) → str_#
│ │ │ │ Return the ID contained within a submission URL.
│ │ │ │ Raises:
│ │ │ │ _I_n_v_a_l_i_d_U_R_L if url is not a valid submission URL.
│ │ │ │ mark_visited()_#
│ │ │ │ Mark submission as visited.
│ │ │ │ This method requires a subscription to reddit premium.
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │ submission.mark_visited()
│ │ │ │ mod() → _S_u_b_m_i_s_s_i_o_n_M_o_d_e_r_a_t_i_o_n_#
│ │ │ │ Provide an instance of _S_u_b_m_i_s_s_i_o_n_M_o_d_e_r_a_t_i_o_n.
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("8dmv8z")
│ │ │ │ submission.mod.approve()
│ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_#
│ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_#
│ │ │ │ Return an instance of cls from data.
│ │ │ │ Parameters:
│ │ │ │ * ddaattaa – The structured data.
│ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t.
│ │ │ │ - reply(bbooddyy:: _ss_tt_rr) → _O_p_t_i_o_n_a_l[_U_n_i_o_n[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t,
│ │ │ │ + reply(bbooddyy:: ssttrr) → Optional[Union[_p_r_a_w_._m_o_d_e_l_s_._C_o_m_m_e_n_t,
│ │ │ │ _p_r_a_w_._m_o_d_e_l_s_._M_e_s_s_a_g_e]]_#
│ │ │ │ Reply to the object.
│ │ │ │ Parameters:
│ │ │ │ bbooddyy – The Markdown formatted content for a comment.
│ │ │ │ Returns:
│ │ │ │ A _C_o_m_m_e_n_t or _M_e_s_s_a_g_e object for the newly created comment or
│ │ │ │ message or None if Reddit doesn’t provide one.
│ │ │ │ @@ -477,46 +477,46 @@
│ │ │ │ by drawing the comment from the user’s comment history.
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │ submission.reply("reply")
│ │ │ │
│ │ │ │ comment = reddit.comment("dxolpyc")
│ │ │ │ comment.reply("reply")
│ │ │ │ - report(rreeaassoonn:: _ss_tt_rr)_#
│ │ │ │ + report(rreeaassoonn:: ssttrr)_#
│ │ │ │ Report this object to the moderators of its subreddit.
│ │ │ │ Parameters:
│ │ │ │ rreeaassoonn – The reason for reporting.
│ │ │ │ Raises:
│ │ │ │ _R_e_d_d_i_t_A_P_I_E_x_c_e_p_t_i_o_n if reason is longer than 100 characters.
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │ submission.report("report reason")
│ │ │ │
│ │ │ │ comment = reddit.comment("dxolpyc")
│ │ │ │ comment.report("report reason")
│ │ │ │ - save(**, ccaatteeggoorryy:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee)_#
│ │ │ │ + save(**, ccaatteeggoorryy:: OOppttiioonnaall[[ssttrr]] == NNoonnee)_#
│ │ │ │ Save the object.
│ │ │ │ Parameters:
│ │ │ │ ccaatteeggoorryy – The category to save to. If the authenticated user
│ │ │ │ does not have Reddit Premium this value is ignored by Reddit
│ │ │ │ (default: None).
│ │ │ │ Example usage:
│ │ │ │ submission = reddit.submission("5or86n")
│ │ │ │ submission.save(category="view later")
│ │ │ │
│ │ │ │ comment = reddit.comment("dxolpyc")
│ │ │ │ comment.save()
│ │ │ │ See also
│ │ │ │ _u_n_s_a_v_e_(_)
│ │ │ │ - pprrooppeerrttyy shortlink:: _ss_tt_rr_#
│ │ │ │ + pprrooppeerrttyy shortlink:: ssttrr_#
│ │ │ │ Return a shortlink to the submission.
│ │ │ │ For example, _h_t_t_p_s_:_/_/_r_e_d_d_._i_t_/_e_o_r_h_m is a shortlink for _h_t_t_p_s_:_/_/
│ │ │ │ _w_w_w_._r_e_d_d_i_t_._c_o_m_/_r_/_a_n_n_o_u_n_c_e_m_e_n_t_s_/_c_o_m_m_e_n_t_s_/_e_o_r_h_m_/
│ │ │ │ _r_e_d_d_i_t___3_0___l_e_s_s___t_y_p_i_n_g_/.
│ │ │ │ - unhide(**, ootthheerr__ssuubbmmiissssiioonnss:: _OO_pp_tt_ii_oo_nn_aa_ll[[_LL_ii_ss_tt[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_mm_ii_ss_ss_ii_oo_nn]]]] ==
│ │ │ │ + unhide(**, ootthheerr__ssuubbmmiissssiioonnss:: OOppttiioonnaall[[LLiisstt[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_mm_ii_ss_ss_ii_oo_nn]]]] ==
│ │ │ │ NNoonnee)_#
│ │ │ │ Unhide _S_u_b_m_i_s_s_i_o_n.
│ │ │ │ Parameters:
│ │ │ │ ootthheerr__ssuubbmmiissssiioonnss – When provided, additionally unhide this
│ │ │ │ list of _S_u_b_m_i_s_s_i_o_n instances as part of a single request
│ │ │ │ (default: None).
│ │ │ │ Example usage:
│ │ ├── ./usr/share/doc/praw-doc/html/code_overview/models/subreddit.html
│ │ │ @@ -355,15 +355,15 @@
│ │ │
│ │ │
│ │ │ - │ │ │ -class praw.models.Subreddit(reddit: praw.Reddit, display_name: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.Subreddit(reddit: praw.Reddit, display_name: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
A class for Subreddits.
│ │ │To obtain an instance of this class for r/test execute:
│ │ ││ │ ││ │ │subreddit = reddit.subreddit("test") │ │ │
While r/all is not a real subreddit, it can still be treated like one. The following │ │ │ outputs the titles of the 25 hottest submissions in r/all:
│ │ │ @@ -461,15 +461,15 @@ │ │ │Note
│ │ │Trying to retrieve attributes of quarantined or private subreddits will result │ │ │ in a 403 error. Trying to retrieve attributes of a banned subreddit will result │ │ │ in a 404 error.
│ │ │ │ │ │-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, display_name: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, display_name: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │Subreddit
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
reddit – An instance of
Reddit
.
│ │ │ display_name – The name of the subreddit.
│ │ │
│ │ ││ │ │reddit.subreddit("test").contributor.add("spez") │ │ │
-
│ │ │
- │ │ │ -controversial(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +controversial(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for controversial items.-
│ │ │
- Parameters: │ │ │
time_filter – Can be one of:
│ │ │"all"
,"day"
,"hour"
, │ │ │"month"
,"week"
, or"year"
(default:"all"
).
│ │ │ - Raises: │ │ │ -
│ │ │ +ValueError
iftime_filter
is invalid. │ │ │
│ │ │ValueError
iftime_filter
is invalid.
Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").controversial(time_filter="week") │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").controversial( │ │ │ @@ -614,36 +614,36 @@ │ │ │ print(template) │ │ │
-
│ │ │
- │ │ │ -property fullname: str# │ │ │ +property fullname: str# │ │ │
Return the object’s fullname.
│ │ │A fullname is an object’s kind mapping like
│ │ │t3
followed by an underscore and │ │ │ the object’s base36 ID, e.g.,t1_c5s96e0
.
-
│ │ │
- │ │ │ -gilded(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +gilded(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for gilded items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get gilded items in r/test:
│ │ ││ │ ││ │ │for item in reddit.subreddit("test").gilded(): │ │ │ print(item.id) │ │ │
-
│ │ │
- │ │ │ -hot(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +hot(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for hot items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").hot() │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").hot() │ │ │ reddit.redditor("spez").hot() │ │ │ @@ -652,15 +652,15 @@ │ │ │ reddit.subreddit("all").hot() │ │ │
-
│ │ │
- │ │ │ -message(*, from_subreddit: Optional[Union[praw.models.Subreddit, str]] = None, message: str, subject: str)# │ │ │ +message(*, from_subreddit: Optional[Union[praw.models.Subreddit, str]] = None, message: str, subject: str)# │ │ │
Send a message to a
│ │ │Redditor
or aSubreddit
’s moderators (modmail).-
│ │ │
- Parameters: │ │ │
-
│ │ │
from_subreddit –
A
│ │ │ @@ -736,15 +736,15 @@ │ │ │ print(f"{mute}: {mute.date}") │ │ │ │ │ │ │ │ │Subreddit
instance or string to send the │ │ │ message from. When provided, messages are sent from the subreddit rather │ │ │ than from the authenticated user.
-
│ │ │
- │ │ │ -new(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +new(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for new items.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").new() │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").new() │ │ │ reddit.redditor("spez").new() │ │ │ @@ -753,29 +753,29 @@ │ │ │ reddit.subreddit("all").new() │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -post_requirements() Dict[str, Union[str, int, bool]] # │ │ │ +post_requirements() Dict[str, Union[str, int, bool]] # │ │ │
Get the post requirements for a subreddit.
│ │ │-
│ │ │
- Returns: │ │ │
A dict with the various requirements.
│ │ │
│ │ │
The returned dict contains the following keys:
│ │ │ @@ -816,41 +816,41 @@ │ │ ││ │ ││ │ │reddit.subreddit("test").quaran.opt_in() │ │ │
-
│ │ │
- │ │ │ -random() Optional[praw.models.Submission] # │ │ │ +random() Optional[praw.models.Submission] # │ │ │
Return a random
│ │ │Submission
.Returns
│ │ │None
on subreddits that do not support the random feature. One │ │ │ example, at the time of writing, is r/wallpapers.For example, to get a random submission off of r/AskReddit:
│ │ ││ │ ││ │ │submission = reddit.subreddit("AskReddit").random() │ │ │ print(submission.title) │ │ │
-
│ │ │
- │ │ │ -random_rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │ +random_rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for random rising submissions.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get random rising submissions for r/test:
│ │ ││ │ ││ │ │for submission in reddit.subreddit("test").random_rising(): │ │ │ print(submission.title) │ │ │
-
│ │ │
- │ │ │ -rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │ +rising(**generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for rising submissions.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.For example, to get rising submissions for r/test:
│ │ ││ │ │ │ │ ││ │ │ @@ -874,15 +874,15 @@ │ │ │ ) │ │ │for submission in reddit.subreddit("test").rising(): │ │ │ print(submission.title) │ │ │
-
│ │ │
- │ │ │ -search(query: str, *, sort: str = 'relevance', syntax: str = 'lucene', time_filter: str = 'all', **generator_kwargs: Any) Iterator[praw.models.Submission] # │ │ │ +search(query: str, *, sort: str = 'relevance', syntax: str = 'lucene', time_filter: str = 'all', **generator_kwargs: Any) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for items that matchquery
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
query – The query string to search for.
│ │ │ sort – Can be one of:
"relevance"
,"hot"
,"top"
,"new"
, or │ │ │"comments"
. (default:"relevance"
).
│ │ │ @@ -900,15 +900,15 @@
│ │ │ print(submission.title)
│ │ │
│ │ │
│ │ │
-
│ │ │
- │ │ │ -sticky(*, number: int = 1) praw.models.Submission # │ │ │ +sticky(*, number: int = 1) praw.models.Submission # │ │ │
Return a
│ │ │Submission
object for a sticky of the subreddit.-
│ │ │
- Parameters: │ │ │
number – Specify which sticky to return. 1 appears at the top (default: │ │ │
│ │ │1
).
│ │ │ - Raises: │ │ │ @@ -951,15 +951,15 @@ │ │ │ subreddit.stylesheet.update(stylesheet.stylesheet) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -submit(title: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, draft_id: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, inline_media: Optional[Dict[str, praw.models.InlineMedia]] = None, nsfw: bool = False, resubmit: bool = True, selftext: Optional[str] = None, send_replies: bool = True, spoiler: bool = False, url: Optional[str] = None) praw.models.Submission # │ │ │ +submit(title: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, draft_id: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, inline_media: Optional[Dict[str, praw.models.InlineMedia]] = None, nsfw: bool = False, resubmit: bool = True, selftext: Optional[str] = None, send_replies: bool = True, spoiler: bool = False, url: Optional[str] = None) praw.models.Submission # │ │ │
Add a submission to the
│ │ │Subreddit
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
title – The title of the submission.
│ │ │ collection_id – The UUID of a
Collection
to add the │ │ │ newly-submitted post to.
│ │ │ @@ -1047,15 +1047,15 @@
│ │ │ submit_video()
to submit videos and videogifs
│ │ │
-
│ │ │
- │ │ │ -submit_gallery(title: str, images: List[Dict[str, str]], *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, send_replies: bool = True, spoiler: bool = False)# │ │ │ +submit_gallery(title: str, images: List[Dict[str, str]], *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, send_replies: bool = True, spoiler: bool = False)# │ │ │
Add an image gallery submission to the subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
title – The title of the submission.
│ │ │ images – The images to post in dict with the following structure: │ │ │
{"image_path": "path", "caption": "caption", "outbound_url": "url"}
, │ │ │ @@ -1112,15 +1112,15 @@ │ │ │submit_video()
to submit videos and videogifs
│ │ │
-
│ │ │
- │ │ │ -submit_image(title: str, image_path: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, resubmit: bool = True, send_replies: bool = True, spoiler: bool = False, timeout: int = 10, without_websockets: bool = False)# │ │ │ +submit_image(title: str, image_path: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, resubmit: bool = True, send_replies: bool = True, spoiler: bool = False, timeout: int = 10, without_websockets: bool = False)# │ │ │
Add an image submission to the subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
collection_id – The UUID of a
Collection
to add the │ │ │ newly-submitted post to.
│ │ │ discussion_type – Set to
"CHAT"
to enable live discussion instead of │ │ │ @@ -1182,15 +1182,15 @@ │ │ │submit_video()
to submit videos and videogifs
│ │ │
-
│ │ │
- │ │ │ -submit_poll(title: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, duration: int, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, options: List[str], resubmit: bool = True, selftext: str, send_replies: bool = True, spoiler: bool = False)# │ │ │ +submit_poll(title: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, duration: int, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, options: List[str], resubmit: bool = True, selftext: str, send_replies: bool = True, spoiler: bool = False)# │ │ │
Add a poll submission to the subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
title – The title of the submission.
│ │ │ collection_id – The UUID of a
Collection
to add the │ │ │ newly-submitted post to.
│ │ │ @@ -1235,15 +1235,15 @@
│ │ │ submit_video()
to submit videos and videogifs
│ │ │
-
│ │ │
- │ │ │ -submit_video(title: str, video_path: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, resubmit: bool = True, send_replies: bool = True, spoiler: bool = False, thumbnail_path: Optional[str] = None, timeout: int = 10, videogif: bool = False, without_websockets: bool = False)# │ │ │ +submit_video(title: str, video_path: str, *, collection_id: Optional[str] = None, discussion_type: Optional[str] = None, flair_id: Optional[str] = None, flair_text: Optional[str] = None, nsfw: bool = False, resubmit: bool = True, send_replies: bool = True, spoiler: bool = False, thumbnail_path: Optional[str] = None, timeout: int = 10, videogif: bool = False, without_websockets: bool = False)# │ │ │
Add a video or videogif submission to the subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
title – The title of the submission.
│ │ │ video_path – The path to a video, to upload and post.
│ │ │ collection_id – The UUID of a
Collection
to add the │ │ │ @@ -1310,15 +1310,15 @@ │ │ │submit_poll()
to submit polls
│ │ │
-
│ │ │
- │ │ │ -subscribe(*, other_subreddits: Optional[List[praw.models.Subreddit]] = None)# │ │ │ +subscribe(*, other_subreddits: Optional[List[praw.models.Subreddit]] = None)# │ │ │
Subscribe to the subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
other_subreddits – When provided, also subscribe to the provided list of │ │ │ subreddits.
│ │ │
│ │ │
│ │ ││ │ │reddit.subreddit("test").subscribe() │ │ │
-
│ │ │
- │ │ │ -top(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │ +top(*, time_filter: str = 'all', **generator_kwargs: Union[str, int, Dict[str, str]]) Iterator[Any] # │ │ │
Return a
│ │ │ListingGenerator
for top items.-
│ │ │
- Parameters: │ │ │
time_filter – Can be one of:
│ │ │"all"
,"day"
,"hour"
, │ │ │"month"
,"week"
, or"year"
(default:"all"
).
│ │ │ - Raises: │ │ │ -
│ │ │ +ValueError
iftime_filter
is invalid. │ │ │
│ │ │ValueError
iftime_filter
is invalid.
Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.This method can be used like:
│ │ ││ │ ││ │ │reddit.domain("imgur.com").top(time_filter="week") │ │ │ reddit.multireddit(redditor="samuraisam", name="programming").top(time_filter="day") │ │ │ @@ -1352,15 +1352,15 @@ │ │ │ reddit.subreddit("all").top(time_filter="hour") │ │ │
-
│ │ │
- │ │ │ -traffic() Dict[str, List[List[int]]] # │ │ │ +traffic() Dict[str, List[List[int]]] # │ │ │
Return a dictionary of the
│ │ │Subreddit
’s traffic statistics.-
│ │ │
- Raises: │ │ │
│ │ │prawcore.NotFound
when the traffic stats aren’t available to the │ │ │ authenticated user, that is, they are not public and the authenticated user │ │ │ is not a moderator of the subreddit.
│ │ │ @@ -1380,15 +1380,15 @@
│ │ │
│ │ ││ │ │stats = reddit.subreddit("test").traffic() │ │ │
-
│ │ │
- │ │ │ -unsubscribe(*, other_subreddits: Optional[List[praw.models.Subreddit]] = None)# │ │ │ +unsubscribe(*, other_subreddits: Optional[List[praw.models.Subreddit]] = None)# │ │ │
Unsubscribe from the subreddit.
│ │ │-
│ │ │
- Parameters: │ │ │
other_subreddits – When provided, also unsubscribe from the provided list │ │ │ of subreddits.
│ │ │
│ │ │
│ │ │ │ │ │ WikiPage#
│ │ │-
│ │ │
- │ │ │ -class praw.models.reddit.wikipage.WikiPage(reddit: praw.Reddit, subreddit: praw.models.Subreddit, name: str, revision: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +class praw.models.reddit.wikipage.WikiPage(reddit: praw.Reddit, subreddit: praw.models.Subreddit, name: str, revision: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
An individual
│ │ │WikiPage
object.Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -405,41 +405,41 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The
Subreddit
this wiki page belongs to.-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, subreddit: praw.models.Subreddit, name: str, revision: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │ +__init__(reddit: praw.Reddit, subreddit: praw.models.Subreddit, name: str, revision: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)# │ │ │
Initialize a
│ │ │WikiPage
instance.-
│ │ │
- Parameters: │ │ │
revision – A specific revision ID to fetch. By default, fetches the most │ │ │ recent revision.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -discussions(**generator_kwargs: Any) Iterator[praw.models.Submission] # │ │ │ +discussions(**generator_kwargs: Any) Iterator[praw.models.Submission] # │ │ │
Return a
│ │ │ListingGenerator
for discussions of a wiki page.Discussions are site-wide links to a wiki page.
│ │ │Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.To view the titles of discussions of the page
│ │ │"praw_test"
in r/test, try:│ │ ││ │ │for submission in reddit.subreddit("test").wiki["praw_test"].discussions(): │ │ │ print(submission.title) │ │ │
-
│ │ │
- │ │ │ -edit(*, content: str, reason: Optional[str] = None, **other_settings: Any)# │ │ │ +edit(*, content: str, reason: Optional[str] = None, **other_settings: Any)# │ │ │
Edit this wiki page’s contents.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
content – The updated Markdown content of the page.
│ │ │ reason – The reason for the revision.
│ │ │ other_settings – Additional keyword arguments to pass.
│ │ │ @@ -462,39 +462,39 @@
│ │ │
│ │ ││ │ │reddit.subreddit("test").wiki["praw_test"].mod.add("spez") │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -revision(revision: str)# │ │ │ +revision(revision: str)# │ │ │
Return a specific version of this page by revision ID.
│ │ │To view revision
│ │ │"1234abc"
of"praw_test"
in r/test:│ │ ││ │ │page = reddit.subreddit("test").wiki["praw_test"].revision("1234abc") │ │ │
-
│ │ │
- │ │ │ -revisions(**generator_kwargs: Union[str, int, Dict[str, str]]) Generator[WikiPage, None, None] # │ │ │ +revisions(**generator_kwargs: Union[str, int, Dict[str, str]]) Generator[WikiPage, None, None] # │ │ │
Return a
│ │ │ListingGenerator
for page revisions.Additional keyword arguments are passed in the initialization of │ │ │
│ │ │ListingGenerator
.To view the wiki revisions for
│ │ │"praw_test"
in r/test try:│ │ ││ │ │ ├── html2text {} │ │ │ │ @@ -162,16 +162,16 @@ │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ WWiikkiiPPaaggee_## ************ │ │ │ │ ccllaassss praw.models.reddit.wikipage.WikiPage(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, ssuubbrreeddddiitt:: │ │ │ │ - _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt, nnaammee:: _ss_tt_rr, rreevviissiioonn:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: │ │ │ │ - _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == NNoonnee)_# │ │ │ │ + _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt, nnaammee:: ssttrr, rreevviissiioonn:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: │ │ │ │ + OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == NNoonnee)_# │ │ │ │ An individual _W_i_k_i_P_a_g_e object. │ │ │ │ TTyyppiiccaall AAttttrriibbuutteess │ │ │ │ Note │ │ │ │ This table describes attributes that typically belong to objects of this │ │ │ │ class. PRAW dynamically provides the attributes that Reddit returns via │ │ │ │ the API. Since those attributes are subject to change on Reddit’s end, │ │ │ │ PRAW makes no effort to document any new/removed/changed attributes, │ │ │ │ @@ -186,59 +186,59 @@ │ │ │ │ may_revise A bool representing whether or not the authenticated user │ │ │ │ may edit the wiki page. │ │ │ │ name The name of the wiki page. │ │ │ │ revision_by The _R_e_d_d_i_t_o_r who authored this revision of the wiki page. │ │ │ │ revision_date The time of this revision, in _U_n_i_x_ _T_i_m_e. │ │ │ │ subreddit The _S_u_b_r_e_d_d_i_t this wiki page belongs to. │ │ │ │ __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, ssuubbrreeddddiitt:: _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt, nnaammee:: │ │ │ │ - _ss_tt_rr, rreevviissiioonn:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]] == │ │ │ │ + ssttrr, rreevviissiioonn:: OOppttiioonnaall[[ssttrr]] == NNoonnee, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]] == │ │ │ │ NNoonnee)_# │ │ │ │ Initialize a _W_i_k_i_P_a_g_e instance. │ │ │ │ Parameters: │ │ │ │ rreevviissiioonn – A specific revision ID to fetch. By default, │ │ │ │ fetches the most recent revision. │ │ │ │ - discussions(****ggeenneerraattoorr__kkwwaarrggss:: _AA_nn_yy) → _I_t_e_r_a_t_o_r │ │ │ │ + discussions(****ggeenneerraattoorr__kkwwaarrggss:: AAnnyy) → Iterator │ │ │ │ [_p_r_a_w_._m_o_d_e_l_s_._S_u_b_m_i_s_s_i_o_n]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for discussions of a wiki page. │ │ │ │ Discussions are site-wide links to a wiki page. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ To view the titles of discussions of the page "praw_test" in r/ │ │ │ │ test, try: │ │ │ │ for submission in reddit.subreddit("test").wiki │ │ │ │ ["praw_test"].discussions(): │ │ │ │ print(submission.title) │ │ │ │ - edit(**, ccoonntteenntt:: _ss_tt_rr, rreeaassoonn:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ****ootthheerr__sseettttiinnggss:: │ │ │ │ - _AA_nn_yy)_# │ │ │ │ + edit(**, ccoonntteenntt:: ssttrr, rreeaassoonn:: OOppttiioonnaall[[ssttrr]] == NNoonnee, ****ootthheerr__sseettttiinnggss:: │ │ │ │ + AAnnyy)_# │ │ │ │ Edit this wiki page’s contents. │ │ │ │ Parameters: │ │ │ │ * ccoonntteenntt – The updated Markdown content of the page. │ │ │ │ * rreeaassoonn – The reason for the revision. │ │ │ │ * ootthheerr__sseettttiinnggss – Additional keyword arguments to pass. │ │ │ │ For example, to replace the first wiki page of r/test with the │ │ │ │ phrase "test wiki page": │ │ │ │ page = next(iter(reddit.subreddit("test").wiki)) │ │ │ │ page.edit(content="test wiki page") │ │ │ │ mod() → _W_i_k_i_P_a_g_e_M_o_d_e_r_a_t_i_o_n_# │ │ │ │ Provide an instance of _W_i_k_i_P_a_g_e_M_o_d_e_r_a_t_i_o_n. │ │ │ │ For example, to add u/spez as an editor on the wikipage "praw_test" │ │ │ │ try: │ │ │ │ reddit.subreddit("test").wiki["praw_test"].mod.add("spez") │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_# │ │ │ │ Return an instance of cls from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - revision(rreevviissiioonn:: _ss_tt_rr)_# │ │ │ │ + revision(rreevviissiioonn:: ssttrr)_# │ │ │ │ Return a specific version of this page by revision ID. │ │ │ │ To view revision "1234abc" of "praw_test" in r/test: │ │ │ │ page = reddit.subreddit("test").wiki["praw_test"].revision │ │ │ │ ("1234abc") │ │ │ │ - revisions(****ggeenneerraattoorr__kkwwaarrggss:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt,, _DD_ii_cc_tt[[_ss_tt_rr,, _ss_tt_rr]]]]) → │ │ │ │ - _G_e_n_e_r_a_t_o_r[_W_i_k_i_P_a_g_e, _N_o_n_e, _N_o_n_e]_# │ │ │ │ + revisions(****ggeenneerraattoorr__kkwwaarrggss:: UUnniioonn[[ssttrr,, iinntt,, DDiicctt[[ssttrr,, ssttrr]]]]) → │ │ │ │ + Generator[_W_i_k_i_P_a_g_e, None, None]_# │ │ │ │ Return a _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r for page revisions. │ │ │ │ Additional keyword arguments are passed in the initialization of │ │ │ │ _L_i_s_t_i_n_g_G_e_n_e_r_a_t_o_r. │ │ │ │ To view the wiki revisions for "praw_test" in r/test try: │ │ │ │ for item in reddit.subreddit("test").wiki["praw_test"].revisions(): │ │ │ │ print(item) │ │ │ │ To get _W_i_k_i_P_a_g_e objects for each revision: │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/other/auth.html │ │ │ @@ -355,45 +355,45 @@ │ │ │ │ │ │for item in reddit.subreddit("test").wiki["praw_test"].revisions(): │ │ │ print(item) │ │ │
│ │ │ │ │ │ Auth#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Auth(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │ +class praw.models.Auth(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │
Auth provides an interface to Reddit’s authorization.
│ │ │-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │ +__init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │
Initialize a
│ │ │PRAWBase
instance.-
│ │ │
- Parameters: │ │ │
reddit – An instance of
│ │ │Reddit
.
│ │ │
-
│ │ │
- │ │ │ -authorize(code: str) Optional[str] # │ │ │ +authorize(code: str) Optional[str] # │ │ │
Complete the web authorization flow and return the refresh token.
│ │ │-
│ │ │
- Parameters: │ │ │
code – The code obtained through the request to the redirect uri.
│ │ │
│ │ │ - Returns: │ │ │
The obtained refresh token, if available, otherwise
│ │ │None
.
│ │ │
The session’s active authorization will be updated upon success.
│ │ │
-
│ │ │
- │ │ │ -implicit(*, access_token: str, expires_in: int, scope: str) None # │ │ │ +implicit(*, access_token: str, expires_in: int, scope: str) None # │ │ │
Set the active authorization to be an implicit authorization.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
access_token – The access_token obtained from Reddit’s callback.
│ │ │ expires_in – The number of seconds the
│ │ │access_token
is valid for. The │ │ │ origin of this value was returned from Reddit’s callback. You may need to │ │ │ @@ -409,15 +409,15 @@ │ │ │ non-installed application type.
│ │ │
-
│ │ │
- │ │ │ -property limits: Dict[str, Optional[Union[str, int]]]# │ │ │ +property limits: Dict[str, Optional[Union[str, int]]]# │ │ │
Return a dictionary containing the rate limit info.
│ │ │The keys are:
│ │ │-
│ │ │
- Remaining: │ │ │
The number of requests remaining to be made in the current rate │ │ │ limit window.
│ │ │
│ │ │ @@ -435,36 +435,36 @@
│ │ │ computed on Reddit’s end in preparation for sending the response. This value may
│ │ │ change slightly within a given window due to slight changes in response times
│ │ │ and rounding.
│ │ │ │ │ │ Subreddit#
│ │ │-
│ │ │
│ │ │ │ │ │ Submission#
│ │ │-
│ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -scopes() Set[str] # │ │ │ +scopes() Set[str] # │ │ │
Return a set of scopes included in the current authorization.
│ │ │For read-only authorizations this should return
│ │ │{"*"}
.
-
│ │ │
- │ │ │ -url(*, duration: str = 'permanent', implicit: bool = False, scopes: List[str], state: str) str # │ │ │ +url(*, duration: str = 'permanent', implicit: bool = False, scopes: List[str], state: str) str # │ │ │
Return the URL used out-of-band to grant access to your application.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
duration – Either
"permanent"
or"temporary"
(default: │ │ │"permanent"
)."temporary"
authorizations generate access tokens that │ │ │ last only 1 hour."permanent"
authorizations additionally generate a │ │ │ ├── html2text {} │ │ │ │ @@ -161,29 +161,29 @@ │ │ │ │ * _R_e_f_e_r_e_n_c_e_s │ │ │ │ * _S_p_o_n_s_o_r_s │ │ │ │ * _I_n_d_e_x │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ AAuutthh_## ************ │ │ │ │ - ccllaassss praw.models.Auth(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]])_# │ │ │ │ + ccllaassss praw.models.Auth(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]])_# │ │ │ │ Auth provides an interface to Reddit’s authorization. │ │ │ │ - __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: _OO_pp_tt_ii_oo_nn_aa_ll[[_DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]]]])_# │ │ │ │ + __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt, __ddaattaa:: OOppttiioonnaall[[DDiicctt[[ssttrr,, AAnnyy]]]])_# │ │ │ │ Initialize a _P_R_A_W_B_a_s_e instance. │ │ │ │ Parameters: │ │ │ │ rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - authorize(ccooddee:: _ss_tt_rr) → _O_p_t_i_o_n_a_l[_s_t_r]_# │ │ │ │ + authorize(ccooddee:: ssttrr) → Optional[str]_# │ │ │ │ Complete the web authorization flow and return the refresh token. │ │ │ │ Parameters: │ │ │ │ ccooddee – The code obtained through the request to the redirect │ │ │ │ uri. │ │ │ │ Returns: │ │ │ │ The obtained refresh token, if available, otherwise None. │ │ │ │ The session’s active authorization will be updated upon success. │ │ │ │ - implicit(**, aacccceessss__ttookkeenn:: _ss_tt_rr, eexxppiirreess__iinn:: _ii_nn_tt, ssccooppee:: _ss_tt_rr) → _N_o_n_e_# │ │ │ │ + implicit(**, aacccceessss__ttookkeenn:: ssttrr, eexxppiirreess__iinn:: iinntt, ssccooppee:: ssttrr) → None_# │ │ │ │ Set the active authorization to be an implicit authorization. │ │ │ │ Parameters: │ │ │ │ * aacccceessss__ttookkeenn – The access_token obtained from Reddit’s │ │ │ │ callback. │ │ │ │ * eexxppiirreess__iinn – The number of seconds the access_token is │ │ │ │ valid for. The origin of this value was returned from │ │ │ │ Reddit’s callback. You may need to subtract an offset │ │ │ │ @@ -191,15 +191,15 @@ │ │ │ │ between when Reddit prepared the response, and when you │ │ │ │ make this function call. │ │ │ │ * ssccooppee – A space-delimited string of Reddit OAuth2 scope │ │ │ │ names as returned from Reddit’s callback. │ │ │ │ Raises: │ │ │ │ _I_n_v_a_l_i_d_I_m_p_l_i_c_i_t_A_u_t_h if _R_e_d_d_i_t was initialized for a non- │ │ │ │ installed application type. │ │ │ │ - pprrooppeerrttyy limits:: _DD_ii_cc_tt[[_ss_tt_rr,, _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn[[_ss_tt_rr,, _ii_nn_tt]]]]]]_# │ │ │ │ + pprrooppeerrttyy limits:: DDiicctt[[ssttrr,, OOppttiioonnaall[[UUnniioonn[[ssttrr,, iinntt]]]]]]_# │ │ │ │ Return a dictionary containing the rate limit info. │ │ │ │ The keys are: │ │ │ │ Remaining: │ │ │ │ The number of requests remaining to be made in the current │ │ │ │ rate limit window. │ │ │ │ Reset_timestamp: │ │ │ │ A unix timestamp providing an upper bound on when the rate │ │ │ │ @@ -208,24 +208,24 @@ │ │ │ │ The number of requests made in the current rate limit window. │ │ │ │ All values are initially None as these values are set in response │ │ │ │ to issued requests. │ │ │ │ The reset_timestamp value is an upper bound as the real timestamp │ │ │ │ is computed on Reddit’s end in preparation for sending the │ │ │ │ response. This value may change slightly within a given window due │ │ │ │ to slight changes in response times and rounding. │ │ │ │ - ccllaassssmmeetthhoodd parse(ddaattaa:: _DD_ii_cc_tt[[_ss_tt_rr,, _AA_nn_yy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → _A_n_y_# │ │ │ │ + ccllaassssmmeetthhoodd parse(ddaattaa:: DDiicctt[[ssttrr,, AAnnyy]], rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt) → Any_# │ │ │ │ Return an instance of cls from data. │ │ │ │ Parameters: │ │ │ │ * ddaattaa – The structured data. │ │ │ │ * rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - scopes() → _S_e_t[_s_t_r]_# │ │ │ │ + scopes() → Set[str]_# │ │ │ │ Return a set of scopes included in the current authorization. │ │ │ │ For read-only authorizations this should return {"*"}. │ │ │ │ - url(**, dduurraattiioonn:: _ss_tt_rr == ''ppeerrmmaanneenntt'', iimmpplliicciitt:: _bb_oo_oo_ll == FFaallssee, ssccooppeess:: │ │ │ │ - _LL_ii_ss_tt[[_ss_tt_rr]], ssttaattee:: _ss_tt_rr) → _s_t_r_# │ │ │ │ + url(**, dduurraattiioonn:: ssttrr == ''ppeerrmmaanneenntt'', iimmpplliicciitt:: bbooooll == FFaallssee, ssccooppeess:: │ │ │ │ + LLiisstt[[ssttrr]], ssttaattee:: ssttrr) → str_# │ │ │ │ Return the URL used out-of-band to grant access to your │ │ │ │ application. │ │ │ │ Parameters: │ │ │ │ * dduurraattiioonn – Either "permanent" or "temporary" (default: │ │ │ │ "permanent"). "temporary" authorizations generate │ │ │ │ access tokens that last only 1 hour. "permanent" │ │ │ │ authorizations additionally generate a refresh token │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/other/base_mod_notes.html │ │ │ @@ -370,15 +370,15 @@ │ │ │ │ │ │reddit – An instance of
│ │ │Reddit
.
-
│ │ │
- │ │ │ -create(*, label: Optional[str] = None, note: str, redditor: Optional[Union[Redditor, str]] = None, subreddit: Optional[Union[praw.models.Subreddit, str]] = None, thing: Optional[Union[Comment, Submission, str]] = None, **other_settings: Any) praw.models.ModNote # │ │ │ +create(*, label: Optional[str] = None, note: str, redditor: Optional[Union[Redditor, str]] = None, subreddit: Optional[Union[praw.models.Subreddit, str]] = None, thing: Optional[Union[Comment, Submission, str]] = None, **other_settings: Any) praw.models.ModNote # │ │ │
Create a
│ │ │ModNote
for a redditor in the specified subreddit.-
│ │ │
- Parameters: │ │ │
-
│ │ │
label – The label for the note. As of this writing, this can be one of the │ │ │ following:
"ABUSE_WARNING"
,"BAN"
,"BOT_BAN"
, │ │ │"HELPFUL_USER"
,"PERMA_BAN"
,"SOLID_CONTRIBUTOR"
, │ │ │ @@ -425,15 +425,15 @@ │ │ │ ) │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -delete(*, delete_all: bool = False, note_id: Optional[str] = None, redditor: Optional[Union[Redditor, str]] = None, subreddit: Optional[Union[praw.models.Subreddit, str]] = None)# │ │ │ +delete(*, delete_all: bool = False, note_id: Optional[str] = None, redditor: Optional[Union[Redditor, str]] = None, subreddit: Optional[Union[praw.models.Subreddit, str]] = None)# │ │ │
Delete note(s) for a redditor.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
delete_all –
When
│ │ │True
, delete all notes for the specified redditor in │ │ │ the specified subreddit (default:False
).│ │ │ ├── html2text {} │ │ │ │ @@ -167,18 +167,18 @@ │ │ │ │ ************ BBaasseeMMooddNNootteess_## ************ │ │ │ │ ccllaassss praw.models.mod_notes.BaseModNotes(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt)_# │ │ │ │ Provides base methods to interact with moderator notes. │ │ │ │ __init__(rreeddddiitt:: _pp_rr_aa_ww_.._RR_ee_dd_dd_ii_tt)_# │ │ │ │ Initialize a _B_a_s_e_M_o_d_N_o_t_e_s instance. │ │ │ │ Parameters: │ │ │ │ rreeddddiitt – An instance of _R_e_d_d_i_t. │ │ │ │ - create(**, llaabbeell:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, nnoottee:: _ss_tt_rr, rreeddddiittoorr:: _OO_pp_tt_ii_oo_nn_aa_ll │ │ │ │ - [[_UU_nn_ii_oo_nn[[_RR_ee_dd_dd_ii_tt_oo_rr,, _ss_tt_rr]]]] == NNoonnee, ssuubbrreeddddiitt:: _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn │ │ │ │ - [[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, _ss_tt_rr]]]] == NNoonnee, tthhiinngg:: _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn[[_CC_oo_mm_mm_ee_nn_tt,, │ │ │ │ - _SS_uu_bb_mm_ii_ss_ss_ii_oo_nn,, _ss_tt_rr]]]] == NNoonnee, ****ootthheerr__sseettttiinnggss:: _AA_nn_yy) → _p_r_a_w_._m_o_d_e_l_s_._M_o_d_N_o_t_e_# │ │ │ │ + create(**, llaabbeell:: OOppttiioonnaall[[ssttrr]] == NNoonnee, nnoottee:: ssttrr, rreeddddiittoorr:: OOppttiioonnaall │ │ │ │ + [[UUnniioonn[[_RR_ee_dd_dd_ii_tt_oo_rr,, ssttrr]]]] == NNoonnee, ssuubbrreeddddiitt:: OOppttiioonnaall[[UUnniioonn │ │ │ │ + [[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, ssttrr]]]] == NNoonnee, tthhiinngg:: OOppttiioonnaall[[UUnniioonn[[_CC_oo_mm_mm_ee_nn_tt,, │ │ │ │ + _SS_uu_bb_mm_ii_ss_ss_ii_oo_nn,, ssttrr]]]] == NNoonnee, ****ootthheerr__sseettttiinnggss:: AAnnyy) → _p_r_a_w_._m_o_d_e_l_s_._M_o_d_N_o_t_e_# │ │ │ │ Create a _M_o_d_N_o_t_e for a redditor in the specified subreddit. │ │ │ │ Returns: │ │ │ │ The new _M_o_d_N_o_t_e object. │ │ │ │ For example, to create a note for u/spez in r/test: │ │ │ │ reddit.subreddit("test").mod.notes.create( │ │ │ │ label="HELPFUL_USER", note="Test note", redditor="spez" │ │ │ │ ) │ │ │ │ @@ -187,17 +187,17 @@ │ │ │ │ label="HELPFUL_USER", note="Test note", subreddit="test" │ │ │ │ ) │ │ │ │ # or │ │ │ │ reddit.notes.create( │ │ │ │ label="HELPFUL_USER", note="Test note", redditor="spez", │ │ │ │ subreddit="test" │ │ │ │ ) │ │ │ │ - delete(**, ddeelleettee__aallll:: _bb_oo_oo_ll == FFaallssee, nnoottee__iidd:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, │ │ │ │ - rreeddddiittoorr:: _OO_pp_tt_ii_oo_nn_aa_ll[[_UU_nn_ii_oo_nn[[_RR_ee_dd_dd_ii_tt_oo_rr,, _ss_tt_rr]]]] == NNoonnee, ssuubbrreeddddiitt:: _OO_pp_tt_ii_oo_nn_aa_ll │ │ │ │ - [[_UU_nn_ii_oo_nn[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, _ss_tt_rr]]]] == NNoonnee)_# │ │ │ │ + delete(**, ddeelleettee__aallll:: bbooooll == FFaallssee, nnoottee__iidd:: OOppttiioonnaall[[ssttrr]] == NNoonnee, │ │ │ │ + rreeddddiittoorr:: OOppttiioonnaall[[UUnniioonn[[_RR_ee_dd_dd_ii_tt_oo_rr,, ssttrr]]]] == NNoonnee, ssuubbrreeddddiitt:: OOppttiioonnaall │ │ │ │ + [[UUnniioonn[[_pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._SS_uu_bb_rr_ee_dd_dd_ii_tt,, ssttrr]]]] == NNoonnee)_# │ │ │ │ Delete note(s) for a redditor. │ │ │ │ For example, to delete a note with the ID "ModNote_d324b280-5ecc- │ │ │ │ 435d-8159-3e259e84e339", try: │ │ │ │ reddit.subreddit("test").mod.notes.delete( │ │ │ │ note_id="ModNote_d324b280-5ecc-435d-8159-3e259e84e339", │ │ │ │ redditor="spez" │ │ │ │ ) │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/other/baselist.html │ │ │ @@ -355,54 +355,54 @@ │ │ │ │ │ ││ │ ││ │ │ │ │ │ BaseList#
│ │ │-
│ │ │
- │ │ │ -class praw.models.list.base.BaseList(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +class praw.models.list.base.BaseList(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
An abstract class to coerce a list into a
│ │ │PRAWBase
.-
│ │ │
- │ │ │ -__contains__(item: Any) bool # │ │ │ +__contains__(item: Any) bool # │ │ │
Test if item exists in the list.
│ │ │
-
│ │ │
- │ │ │ -__getitem__(index: int) Any # │ │ │ +__getitem__(index: int) Any # │ │ │
Return the item at position index in the list.
│ │ │
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Initialize a
│ │ │BaseList
instance.-
│ │ │
- Parameters: │ │ │
reddit – An instance of
│ │ │Reddit
.
│ │ │
-
│ │ │
- │ │ │ -__iter__() Iterator[Any] # │ │ │ +__iter__() Iterator[Any] # │ │ │
Return an iterator to the list.
│ │ │
-
│ │ │
- │ │ │ -__len__() int # │ │ │ +__len__() int # │ │ │
Return the number of items in the list.
│ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Initialize a
│ │ │Widget
instance.
-
│ │ │
- │ │ │ mod() praw.models.WidgetModeration # │ │ │
Get an instance of
│ │ │ @@ -442,15 +442,15 @@ │ │ │ data in theWidgetModeration
for this widget.SubredditWidgets
that this widget belongs to outdated. │ │ │ To remedy this, callrefresh()
. │ │ │ │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │ │ │ │ Image#
│ │ │-
│ │ │
- │ │ │ -class praw.models.Image(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │ +class praw.models.Image(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │
Class to represent an image that’s part of a
│ │ │ImageWidget
.Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -394,26 +394,26 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │Image width.
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │ +__init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │
Initialize a
│ │ │PRAWBase
instance.-
│ │ │
- Parameters: │ │ │
reddit – An instance of
│ │ │Reddit
.
│ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │ │ │ │ ImageData#
│ │ │-
│ │ │
- │ │ │ -class praw.models.ImageData(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │ +class praw.models.ImageData(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │
Class for image data that’s part of a
│ │ │CustomWidget
.Typical Attributes
│ │ ││ │ ││ │ │Note
│ │ │This table describes attributes that typically belong to objects of this class. PRAW │ │ │ dynamically provides the attributes that Reddit returns via the API. Since those │ │ │ attributes are subject to change on Reddit’s end, PRAW makes no effort to document │ │ │ @@ -394,26 +394,26 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The image width.
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │ +__init__(reddit: praw.Reddit, _data: Optional[Dict[str, Any]])# │ │ │
Initialize a
│ │ │PRAWBase
instance.-
│ │ │
- Parameters: │ │ │
reddit – An instance of
│ │ │Reddit
.
│ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │ │ │ │ ImageWidget#
│ │ │-
│ │ │
- │ │ │ -class praw.models.ImageWidget(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +class praw.models.ImageWidget(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Class to represent an image widget.
│ │ │Find an existing one:
│ │ ││ │ ││ │ │image_widget = None │ │ │ widgets = reddit.subreddit("test").widgets │ │ │ for widget in widgets.sidebar: │ │ │ if isinstance(widget, praw.models.ImageWidget): │ │ │ image_widget = widget │ │ │ @@ -442,39 +442,39 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │The
Subreddit
the button widget belongs to.-
│ │ │
- │ │ │ -__contains__(item: Any) bool # │ │ │ +__contains__(item: Any) bool # │ │ │
Test if item exists in the list.
│ │ │
-
│ │ │
- │ │ │ -__getitem__(index: int) Any # │ │ │ +__getitem__(index: int) Any # │ │ │
Return the item at position index in the list.
│ │ │
-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │ +__init__(reddit: praw.Reddit, _data: Dict[str, Any])# │ │ │
Initialize a
│ │ │Widget
instance.
-
│ │ │
- │ │ │ -__iter__() Iterator[Any] # │ │ │ +__iter__() Iterator[Any] # │ │ │
Return an iterator to the list.
│ │ │
-
│ │ │
- │ │ │ -__len__() int # │ │ │ +__len__() int # │ │ │
Return the number of items in the list.
│ │ │
-
│ │ │
- │ │ │ mod() praw.models.WidgetModeration # │ │ │
Get an instance of
│ │ │ @@ -484,15 +484,15 @@ │ │ │ data in theWidgetModeration
for this widget.SubredditWidgets
that this widget belongs to outdated. │ │ │ To remedy this, callrefresh()
. │ │ │
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
│ │ │ │ │ │ InlineGif#
│ │ │-
│ │ │
- │ │ │ -class praw.models.InlineGif(*, caption: str = None, path: str)# │ │ │ +class praw.models.InlineGif(*, caption: str = None, path: str)# │ │ │
Class to provide a gif to embed in text.
│ │ │-
│ │ │
- │ │ │ -__init__(*, caption: str = None, path: str)# │ │ │ +__init__(*, caption: str = None, path: str)# │ │ │
Initialize an
│ │ │InlineMedia
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
caption – An optional caption to add to the image (default:
None
).
│ │ │ path – The path to a media file.
│ │ │
│ │ │ │ │ │ InlineImage#
│ │ │-
│ │ │
- │ │ │ -class praw.models.InlineImage(*, caption: str = None, path: str)# │ │ │ +class praw.models.InlineImage(*, caption: str = None, path: str)# │ │ │
Class to provide am image to embed in text.
│ │ │-
│ │ │
- │ │ │ -__init__(*, caption: str = None, path: str)# │ │ │ +__init__(*, caption: str = None, path: str)# │ │ │
Initialize an
│ │ │InlineMedia
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
caption – An optional caption to add to the image (default:
None
).
│ │ │ path – The path to a media file.
│ │ │
│ │ │ │ │ │ InlineMedia#
│ │ │-
│ │ │
- │ │ │ -class praw.models.InlineMedia(*, caption: str = None, path: str)# │ │ │ +class praw.models.InlineMedia(*, caption: str = None, path: str)# │ │ │
Provides a way to embed media in self posts.
│ │ │-
│ │ │
- │ │ │ -__init__(*, caption: str = None, path: str)# │ │ │ +__init__(*, caption: str = None, path: str)# │ │ │
Initialize an
│ │ │InlineMedia
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
caption – An optional caption to add to the image (default:
None
).
│ │ │ path – The path to a media file.
│ │ │
│ │ │ │ │ │ InlineVideo#
│ │ │-
│ │ │
- │ │ │ -class praw.models.InlineVideo(*, caption: str = None, path: str)# │ │ │ +class praw.models.InlineVideo(*, caption: str = None, path: str)# │ │ │
Class to provide a video to embed in text.
│ │ │-
│ │ │
- │ │ │ -__init__(*, caption: str = None, path: str)# │ │ │ +__init__(*, caption: str = None, path: str)# │ │ │
Initialize an
│ │ │InlineMedia
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
caption – An optional caption to add to the image (default:
None
).
│ │ │ path – The path to a media file.
│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ thread = reddit.live("xyu8kmjvfrww") │ │ │ │ update = thread["cb5fe532-dbee-11e6-9a91-0e6d74fabcc4"] │ │ │ │ update.contrib.strike() │ │ │ │ To check whether the update is stricken or not, use update.stricken │ │ │ │ attribute. │ │ │ │ Note │ │ │ │ Accessing lazy attributes on updates (includes update.stricken) may │ │ │ │ - raise _A_t_t_r_i_b_u_t_e_E_r_r_o_r. See _L_i_v_e_U_p_d_a_t_e for details. │ │ │ │ + raise AttributeError. See _L_i_v_e_U_p_d_a_t_e for details. │ │ │ │ _N_e_x_t │ │ │ │ _C_o_n_t_r_i_b_u_t_o_r_R_e_l_a_t_i_o_n_s_h_i_p │ │ │ │ _P_r_e_v_i_o_u_s │ │ │ │ _L_i_v_e_T_h_r_e_a_d_S_t_r_e_a_m │ │ │ │ Copyright © 2023, Bryce Boe │ │ │ │ Made with _S_p_h_i_n_x and _@_p_r_a_d_y_u_n_s_g's _F_u_r_o │ │ │ │ On this page │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/other/menu.html │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ │ │ │ │ │ListingGenerator#
│ │ │-
│ │ │
- │ │ │ -class praw.models.ListingGenerator(reddit: praw.Reddit, url: str, limit: int = 100, params: Optional[Dict[str, Union[str, int]]] = None)# │ │ │ +class praw.models.ListingGenerator(reddit: praw.Reddit, url: str, limit: int = 100, params: Optional[Dict[str, Union[str, int]]] = None)# │ │ │
Instances of this class generate
│ │ │RedditBase
instances.│ │ ││ │ │Warning
│ │ │This class should not be directly utilized. Instead, you will find a number of │ │ │ methods that return instances of the class here.
│ │ │-
│ │ │
- │ │ │ -__init__(reddit: praw.Reddit, url: str, limit: int = 100, params: Optional[Dict[str, Union[str, int]]] = None)# │ │ │ +__init__(reddit: praw.Reddit, url: str, limit: int = 100, params: Optional[Dict[str, Union[str, int]]] = None)# │ │ │
Initialize a
│ │ │ListingGenerator
instance.-
│ │ │
- Parameters: │ │ │
-
│ │ │
reddit – An instance of
Reddit
.
│ │ │ url – A URL returning a Reddit listing.
│ │ │ limit – The number of content entries to fetch. If
limit
isNone
, │ │ │ @@ -384,21 +384,21 @@ │ │ │
│ │ │
-
│ │ │
- │ │ │ -__iter__() Iterator[Any] # │ │ │ +__iter__() Iterator[Any] # │ │ │
Permit
│ │ │ListingGenerator
to operate as an iterator.
-
│ │ │
- │ │ │ -classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │ +classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any # │ │ │
Return an instance of
│ │ │cls
fromdata
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
data – The structured data.
│ │ │ reddit – An instance of
Reddit
.
│ │ │
LiveContributorRelationship#
│ │ │-
│ │ │
- │ │ │ class praw.models.reddit.live.LiveContributorRelationship(thread: praw.models.LiveThread)# │ │ │
Provide methods to interact with live threads’ contributors.
│ │ │-
│ │ │
- │ │ │ -__call__() List[praw.models.Redditor] # │ │ │ +__call__() List[praw.models.Redditor] # │ │ │
Return a
│ │ │RedditorList
for live threads’ contributors.Usage:
│ │ ││ │ │ @@ -398,15 +398,15 @@ │ │ │ thread.contributor.accept_invite() │ │ │ │ │ │ │ │ ││ │ │thread = reddit.live("ukaeu1ik4sw5") │ │ │ for contributor in thread.contributor(): │ │ │ print(contributor) │ │ │
-
│ │ │
- │ │ │ -invite(redditor: Union[str, praw.models.Redditor], *, permissions: Optional[List[str]] = None)# │ │ │ +invite(redditor: Union[str, praw.models.Redditor], *, permissions: Optional[List[str]] = None)# │ │ │
Invite a redditor to be a contributor of the live thread.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
redditor – A redditor name or
Redditor
instance.
│ │ │ permissions – When provided (not
None
), permissions should be a list │ │ │ of strings specifying which subset of permissions to grant. An empty list │ │ │ @@ -442,15 +442,15 @@ │ │ │ thread.contributor.leave() │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -remove(redditor: Union[str, praw.models.Redditor])# │ │ │ +remove(redditor: Union[str, praw.models.Redditor])# │ │ │
Remove the redditor from the live thread contributors.
│ │ │-
│ │ │
- Parameters: │ │ │
redditor – A redditor fullname (e.g.,
│ │ │"t2_1w72"
) orRedditor
│ │ │ instance.
│ │ │
-
│ │ │
- │ │ │ -remove_invite(redditor: Union[str, praw.models.Redditor])# │ │ │ +remove_invite(redditor: Union[str, praw.models.Redditor])# │ │ │
Remove the invite for redditor.
│ │ │-
│ │ │
- Parameters: │ │ │
redditor – A redditor fullname (e.g.,
│ │ │"t2_1w72"
) orRedditor
│ │ │ instance.
│ │ │
│ │ │ │ │ │LiveContributorRelationship.invite()
to invite a redditor to be a │ │ │ contributor of the live thread.
-
│ │ │
- │ │ │ -update(redditor: Union[str, praw.models.Redditor], *, permissions: Optional[List[str]] = None)# │ │ │ +update(redditor: Union[str, praw.models.Redditor], *, permissions: Optional[List[str]] = None)# │ │ │
Update the contributor permissions for
│ │ │redditor
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
redditor – A redditor name or
Redditor
instance.
│ │ │ permissions – When provided (not
None
), permissions should be a list │ │ │ of strings specifying which subset of permissions to grant (other │ │ │ @@ -516,15 +516,15 @@ │ │ ││ │ ││ │ │subreddit.moderator.update("spez", permissions=[]) │ │ │
-
│ │ │
- │ │ │ -update_invite(redditor: Union[str, praw.models.Redditor], *, permissions: Optional[List[str]] = None)# │ │ │ +update_invite(redditor: Union[str, praw.models.Redditor], *, permissions: Optional[List[str]] = None)# │ │ │
Update the contributor invite permissions for
│ │ │redditor
.-
│ │ │
- Parameters: │ │ │
-
│ │ │
redditor – A redditor name or
Redditor
instance.
│ │ │ permissions – When provided (not
None
), permissions should be a list │ │ │ of strings specifying which subset of permissions to grant (other │ │ │ ├── html2text {} │ │ │ │ @@ -164,15 +164,15 @@ │ │ │ │ _B_a_c_k_ _t_o_ _t_o_p │ │ │ │ Toggle Light / Dark / Auto color theme │ │ │ │ Toggle table of contents sidebar │ │ │ │ ************ LLiivveeCCoonnttrriibbuuttoorrRReellaattiioonnsshhiipp_## ************ │ │ │ │ ccllaassss praw.models.reddit.live.LiveContributorRelationship(tthhrreeaadd:: │ │ │ │ _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._LL_ii_vv_ee_TT_hh_rr_ee_aa_dd)_# │ │ │ │ Provide methods to interact with live threads’ contributors. │ │ │ │ - __call__() → _L_i_s_t[_p_r_a_w_._m_o_d_e_l_s_._R_e_d_d_i_t_o_r]_# │ │ │ │ + __call__() → List[_p_r_a_w_._m_o_d_e_l_s_._R_e_d_d_i_t_o_r]_# │ │ │ │ Return a _R_e_d_d_i_t_o_r_L_i_s_t for live threads’ contributors. │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ for contributor in thread.contributor(): │ │ │ │ print(contributor) │ │ │ │ __init__(tthhrreeaadd:: _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._LL_ii_vv_ee_TT_hh_rr_ee_aa_dd)_# │ │ │ │ Initialize a _L_i_v_e_C_o_n_t_r_i_b_u_t_o_r_R_e_l_a_t_i_o_n_s_h_i_p instance. │ │ │ │ @@ -182,16 +182,16 @@ │ │ │ │ This class should not be initialized directly. Instead, obtain an │ │ │ │ instance via: _L_i_v_e_T_h_r_e_a_d_._c_o_n_t_r_i_b_u_t_o_r_(_). │ │ │ │ accept_invite()_# │ │ │ │ Accept an invite to contribute the live thread. │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ydwwxneu7vsa") │ │ │ │ thread.contributor.accept_invite() │ │ │ │ - invite(rreeddddiittoorr:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]], **, ppeerrmmiissssiioonnss:: │ │ │ │ - _OO_pp_tt_ii_oo_nn_aa_ll[[_LL_ii_ss_tt[[_ss_tt_rr]]]] == NNoonnee)_# │ │ │ │ + invite(rreeddddiittoorr:: UUnniioonn[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]], **, ppeerrmmiissssiioonnss:: │ │ │ │ + OOppttiioonnaall[[LLiisstt[[ssttrr]]]] == NNoonnee)_# │ │ │ │ Invite a redditor to be a contributor of the live thread. │ │ │ │ Parameters: │ │ │ │ * rreeddddiittoorr – A redditor name or _R_e_d_d_i_t_o_r instance. │ │ │ │ * ppeerrmmiissssiioonnss – When provided (not None), permissions │ │ │ │ should be a list of strings specifying which subset of │ │ │ │ permissions to grant. An empty list [] indicates no │ │ │ │ permissions, and when not provided (None), indicates │ │ │ │ @@ -209,39 +209,39 @@ │ │ │ │ _L_i_v_e_C_o_n_t_r_i_b_u_t_o_r_R_e_l_a_t_i_o_n_s_h_i_p_._r_e_m_o_v_e___i_n_v_i_t_e_(_) to remove the invite │ │ │ │ for redditor. │ │ │ │ leave()_# │ │ │ │ Abdicate the live thread contributor position (use with care). │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ydwwxneu7vsa") │ │ │ │ thread.contributor.leave() │ │ │ │ - remove(rreeddddiittoorr:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]])_# │ │ │ │ + remove(rreeddddiittoorr:: UUnniioonn[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]])_# │ │ │ │ Remove the redditor from the live thread contributors. │ │ │ │ Parameters: │ │ │ │ rreeddddiittoorr – A redditor fullname (e.g., "t2_1w72") or _R_e_d_d_i_t_o_r │ │ │ │ instance. │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ redditor = reddit.redditor("spez") │ │ │ │ thread.contributor.remove(redditor) │ │ │ │ thread.contributor.remove("t2_1w72") # with fullname │ │ │ │ - remove_invite(rreeddddiittoorr:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]])_# │ │ │ │ + remove_invite(rreeddddiittoorr:: UUnniioonn[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]])_# │ │ │ │ Remove the invite for redditor. │ │ │ │ Parameters: │ │ │ │ rreeddddiittoorr – A redditor fullname (e.g., "t2_1w72") or _R_e_d_d_i_t_o_r │ │ │ │ instance. │ │ │ │ Usage: │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ redditor = reddit.redditor("spez") │ │ │ │ thread.contributor.remove_invite(redditor) │ │ │ │ thread.contributor.remove_invite("t2_1w72") # with fullname │ │ │ │ See also │ │ │ │ _L_i_v_e_C_o_n_t_r_i_b_u_t_o_r_R_e_l_a_t_i_o_n_s_h_i_p_._i_n_v_i_t_e_(_) to invite a redditor to be a │ │ │ │ contributor of the live thread. │ │ │ │ - update(rreeddddiittoorr:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]], **, ppeerrmmiissssiioonnss:: │ │ │ │ - _OO_pp_tt_ii_oo_nn_aa_ll[[_LL_ii_ss_tt[[_ss_tt_rr]]]] == NNoonnee)_# │ │ │ │ + update(rreeddddiittoorr:: UUnniioonn[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]], **, ppeerrmmiissssiioonnss:: │ │ │ │ + OOppttiioonnaall[[LLiisstt[[ssttrr]]]] == NNoonnee)_# │ │ │ │ Update the contributor permissions for redditor. │ │ │ │ Parameters: │ │ │ │ * rreeddddiittoorr – A redditor name or _R_e_d_d_i_t_o_r instance. │ │ │ │ * ppeerrmmiissssiioonnss – When provided (not None), permissions │ │ │ │ should be a list of strings specifying which subset of │ │ │ │ permissions to grant (other permissions are removed). │ │ │ │ An empty list [] indicates no permissions, and when not │ │ │ │ @@ -250,16 +250,16 @@ │ │ │ │ thread = reddit.live("ukaeu1ik4sw5") │ │ │ │ thread.contributor.update("spez") │ │ │ │ To grant "access" and "edit" permissions (and to remove other │ │ │ │ permissions), try: │ │ │ │ thread.contributor.update("spez", permissions=["access", "edit"]) │ │ │ │ To remove all permissions from the contributor, try: │ │ │ │ subreddit.moderator.update("spez", permissions=[]) │ │ │ │ - update_invite(rreeddddiittoorr:: _UU_nn_ii_oo_nn[[_ss_tt_rr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]], **, │ │ │ │ - ppeerrmmiissssiioonnss:: _OO_pp_tt_ii_oo_nn_aa_ll[[_LL_ii_ss_tt[[_ss_tt_rr]]]] == NNoonnee)_# │ │ │ │ + update_invite(rreeddddiittoorr:: UUnniioonn[[ssttrr,, _pp_rr_aa_ww_.._mm_oo_dd_ee_ll_ss_.._RR_ee_dd_dd_ii_tt_oo_rr]], **, │ │ │ │ + ppeerrmmiissssiioonnss:: OOppttiioonnaall[[LLiisstt[[ssttrr]]]] == NNoonnee)_# │ │ │ │ Update the contributor invite permissions for redditor. │ │ │ │ Parameters: │ │ │ │ * rreeddddiittoorr – A redditor name or _R_e_d_d_i_t_o_r instance. │ │ │ │ * ppeerrmmiissssiioonnss – When provided (not None), permissions │ │ │ │ should be a list of strings specifying which subset of │ │ │ │ permissions to grant (other permissions are removed). │ │ │ │ An empty list [] indicates no permissions, and when not │ │ ├── ./usr/share/doc/praw-doc/html/code_overview/other/livethreadcontribution.html │ │ │ @@ -376,15 +376,15 @@ │ │ │ thread.contrib.add("### update") │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -add(body: str)# │ │ │ +add(body: str)# │ │ │
Add an update to the live thread.
│ │ │-
│ │ │
- Parameters: │ │ │
body – The Markdown formatted content for the update.
│ │ │
│ │ │
Usage:
│ │ │ @@ -403,15 +403,15 @@ │ │ │ thread.contrib.close() │ │ │ │ │ │ │ │ │
-
│ │ │
- │ │ │ -update(*, description: Optional[str] = None, nsfw: Optional[bool] = None, resources: Optional[str] = None, title: Optional[str] = None, **other_settings: Optional[str])# │ │ │ +update(*, description: Optional[str] = None, nsfw: Optional[bool] = None, resources: Optional[str] = None, title: Optional[str] = None, **other_settings: Optional[str])# │ │ │
Update settings of the live thread.
│ │ │-
│ │ │
- Parameters: │ │ │
-
│ │ │
description – The live thread’s description (default:
None
).
│ │ │ nsfw – Indicate whether this thread is not safe for work (default: │ │ │
None
).
│ │ │ ├── html2text {}
│ │ │ │ @@ -172,29 +172,29 @@
│ │ │ │ Initialize a _L_i_v_e_T_h_r_e_a_d_C_o_n_t_r_i_b_u_t_i_o_n instance.
│ │ │ │ Parameters:
│ │ │ │ tthhrreeaadd – An instance of _L_i_v_e_T_h_r_e_a_d.
│ │ │ │ This instance can be retrieved through thread.contrib where thread
│ │ │ │ is a _L_i_v_e_T_h_r_e_a_d instance. E.g.,
│ │ │ │ thread = reddit.live("ukaeu1ik4sw5")
│ │ │ │ thread.contrib.add("### update")
│ │ │ │ - add(bbooddyy:: _ss_tt_rr)_#
│ │ │ │ + add(bbooddyy:: ssttrr)_#
│ │ │ │ Add an update to the live thread.
│ │ │ │ Parameters:
│ │ │ │ bbooddyy – The Markdown formatted content for the update.
│ │ │ │ Usage:
│ │ │ │ thread = reddit.live("ydwwxneu7vsa")
│ │ │ │ thread.contrib.add("test `LiveThreadContribution.add()`")
│ │ │ │ close()_#
│ │ │ │ Close the live thread permanently (cannot be undone).
│ │ │ │ Usage:
│ │ │ │ thread = reddit.live("ukaeu1ik4sw5")
│ │ │ │ thread.contrib.close()
│ │ │ │ - update(**, ddeessccrriippttiioonn:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, nnssffww:: _OO_pp_tt_ii_oo_nn_aa_ll[[_bb_oo_oo_ll]] ==
│ │ │ │ - NNoonnee, rreessoouurrcceess:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee, ttiittllee:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]] == NNoonnee,
│ │ │ │ - ****ootthheerr__sseettttiinnggss:: _OO_pp_tt_ii_oo_nn_aa_ll[[_ss_tt_rr]])_#
│ │ │ │ + update(**, ddeessccrriippttiioonn:: OOppttiioonnaall[[ssttrr]] == NNoonnee, nnssffww:: OOppttiioonnaall[[bbooooll]] ==
│ │ │ │ + NNoonnee, rreessoouurrcceess:: OOppttiioonnaall[[ssttrr]] == NNoonnee, ttiittllee:: OOppttiioonnaall[[ssttrr]] == NNoonnee,
│ │ │ │ + ****ootthheerr__sseettttiinnggss:: OOppttiioonnaall[[ssttrr]])_#
│ │ │ │ Update settings of the live thread.
│ │ │ │ Parameters:
│ │ │ │ * ddeessccrriippttiioonn – The live thread’s description (default:
│ │ │ │ None).
│ │ │ │ * nnssffww – Indicate whether this thread is not safe for
│ │ │ │ work (default: None).
│ │ │ │ * rreessoouurrcceess – Markdown formatted information that is
│ │ ├── ./usr/share/doc/praw-doc/html/code_overview/other/livethreadstream.html
│ │ │ @@ -375,15 +375,15 @@
│ │ │ live_thread – The live thread associated with the stream.
│ │ │
│ │ │
-
│ │ │
- │ │ │ -updates(**stream_options: Dict[str, Any]) Iterator[praw.models.LiveUpdate] # │ │ │ +updates(**stream_options: Dict[str, Any]) Iterator[praw.models.LiveUpdate] # │ │ │
Yield new updates to the live thread as they become available.
│ │ │-
│ │ │
- Parameters: │ │ │
skip_existing – Set to
│ │ │True
to only fetch items created after the │ │ │ stream (default:False
).
│ │ │
To check whether the update is stricken or not, use
│ │ │update.stricken
│ │ │ attribute.│ │ ││ │ │Note
│ │ │Accessing lazy attributes on updates (includes
│ │ │ +raiseupdate.stricken
) may │ │ │ -raiseAttributeError
. SeeLiveUpdate
for details.AttributeError
. SeeLiveUpdate
for details. │ │ │
│ │ │
│ │ │ │ │ │ LiveUpdate#
│ │ │-
│ │ │
│ │ │ │ │ │ LiveThread#
│ │ │-
│ │ │