LiveUpdate¶
- class asyncpraw.models.LiveUpdate(reddit, thread_id=None, update_id=None, _data=None)¶
An individual
LiveUpdateobject.Typical Attributes
Note
This table describes attributes that typically belong to objects of this class. Async PRAW dynamically provides the attributes that Reddit returns via the API. Since those attributes are subject to change on Reddit’s end, Async PRAW makes no effort to document any new/removed/changed attributes, other than to instruct you on how to discover what is available. As a result, this table of attributes may not be complete. See Determine Available Attributes of an Object for detailed information.
If you would like to add an attribute to this table, feel free to open a pull request.
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()).- Parameters:
reddit (asyncpraw.Reddit)
thread_id (str | None)
update_id (str | None)
- __init__(reddit, thread_id=None, update_id=None, _data=None)¶
Initialize a
LiveUpdateinstance.Either
thread_idandupdate_id, or_datamust be provided.- Parameters:
- Return type:
None
Usage:
update = LiveUpdate(reddit, "ukaeu1ik4sw5", "7827987a-c998-11e4-a0b9-22000b6a88d2") await update.load() update.thread # LiveThread(id="ukaeu1ik4sw5") update.id # "7827987a-c998-11e4-a0b9-22000b6a88d2" update.author # "umbrae"
- contrib()¶
Provide an instance of
LiveUpdateContribution.Usage:
thread = await reddit.live("ukaeu1ik4sw5") update = await thread.get_update("7827987a-c998-11e4-a0b9-22000b6a88d2", fetch=False) update.contrib # LiveUpdateContribution instance
- Return type:
- property created_datetime: datetime¶
Return the creation time as a timezone-aware
datetime.datetime.The returned object is localized to the system’s timezone.
- 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.
- await load()¶
Re-fetches the object.
This is used to explicitly fetch or re-fetch the object from reddit. This method can be used on any
RedditBaseobject.await reddit_base_object.load()
- Return type:
- classmethod parse(data, reddit)¶
Return an instance of
clsfromdata.
- property thread: LiveThread¶
Return
LiveThreadobject the update object belongs to.