LiveUpdate¶
- 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
LiveUpdateobject.Typical Attributes
This table describes attributes that typically belong to objects of this class. Since attributes are dynamically provided (see Determine Available Attributes of an Object), there is not a guarantee that these attributes will always be present, nor is this list necessarily complete.
Attribute
Description
authorThe
Redditorwho made the update.bodyBody of the update, as Markdown.
body_htmlBody of the update, as HTML.
created_utcThe time the update was created, as Unix Time.
strickenA
boolrepresenting whether or not the update was stricken (seestrike()).- __init__(reddit: praw.Reddit, thread_id: Optional[str] = None, update_id: Optional[str] = None, _data: Optional[Dict[str, Any]] = None)¶
Initialize a lazy
LiveUpdateinstance.Either
thread_idandupdate_id, or_datamust be provided.- Parameters
reddit – An instance of
Reddit.thread_id – A live thread ID, e.g.,
"ukaeu1ik4sw5".update_id – A live update ID, e.g.,
"7827987a-c998-11e4-a0b9-22000b6a88d2".
Usage:
update = LiveUpdate(reddit, "ukaeu1ik4sw5", "7827987a-c998-11e4-a0b9-22000b6a88d2") update.thread # LiveThread(id="ukaeu1ik4sw5") update.id # "7827987a-c998-11e4-a0b9-22000b6a88d2" update.author # "umbrae"
- contrib() praw.models.reddit.live.LiveUpdateContribution¶
Provide an instance of
LiveUpdateContribution.Usage:
thread = reddit.live("ukaeu1ik4sw5") update = thread["7827987a-c998-11e4-a0b9-22000b6a88d2"] update.contrib # LiveUpdateContribution instance
- property fullname: str¶
Return the object’s fullname.
A fullname is an object’s kind mapping like
t3followed by an underscore and the object’s base36 ID, e.g.,t1_c5s96e0.
- classmethod parse(data: Dict[str, Any], reddit: praw.Reddit) Any¶
Return an instance of
clsfromdata.- Parameters
data – The structured data.
reddit – An instance of
Reddit.
- property thread: praw.models.reddit.live.LiveThread¶
Return
LiveThreadobject the update object belongs to.