
    {i+h                    ,   S r SSKJr  SSKJrJrJrJr  SSKJ	r	  SSK
Jr  SSKJr  SS	KJr  SS
KJr  SSK
Jr  SSKJr  SSKJr  SSKJr  \(       a  SSKr " S S5      r " S S\5      r " S S5      r " S S5      r " S S5      r " S S\\5      r g)zProvide the LiveThread class.    )annotations)TYPE_CHECKINGAnyIterableIterator   )API_PATH)_deprecate_args)cachedproperty   )RedditorList)ListingGenerator)stream_generator   )
RedditBase)FullnameMixin)RedditorNc                      \ rS rSrSr\SS j5       rSS jrSS jrS r	\
" SS5      S	S
.   SS jj5       rS rSS jrSS jr\
" SS5      S	S
.   SS jj5       r\
" SS5      S	S
.   SS jj5       rSrg	)LiveContributorRelationship   z<Provide methods to interact with live threads' contributors.permissionsc                T    U c  S1O
[        U 5      n SR                  S U  5       5      $ )Nall,c              3  ,   #    U  H
  nS U 3v   M     g7f)+N ).0xs     Q/home/james-whalen/.local/lib/python3.13/site-packages/praw/models/reddit/live.py	<genexpr>BLiveContributorRelationship._handle_permissions.<locals>.<genexpr>   s     5A!A3s   )setjoinr   s    r    _handle_permissions/LiveContributorRelationship._handle_permissions   s*    !,!4ug#k:Jxx5555    c                    [         S   R                  U R                  R                  S9nU R                  R                  R                  U5      n[        U[        5      (       a  U$ US   $ )zReturn a :class:`.RedditorList` for live threads' contributors.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    for contributor in thread.contributor():
        print(contributor)

live_contributorsidr   )r	   formatthreadr,   _redditget
isinstancer   )selfurltemps      r    __call__$LiveContributorRelationship.__call__   sZ     *+22dkknn2E{{""&&s+!$55tB47Br(   c                    Xl         g)zInitialize a :class:`.LiveContributorRelationship` instance.

:param thread: An instance of :class:`.LiveThread`.

.. note::

    This class should not be initialized directly. Instead, obtain an instance
    via: :meth:`.LiveThread.contributor`.

Nr.   r2   r.   s     r    __init__$LiveContributorRelationship.__init__-   s	     r(   c                    [         S   R                  U R                  R                  S9nU R                  R                  R                  U5        g)zAccept an invite to contribute the live thread.

Usage:

.. code-block:: python

    thread = reddit.live("ydwwxneu7vsa")
    thread.contributor.accept_invite()

live_accept_inviter+   Nr	   r-   r.   r,   r/   postr2   r3   s     r    accept_invite)LiveContributorRelationship.accept_invite:   s=     +,33t{{~~3F  %r(   redditorNr%   c                   [         S   R                  U R                  R                  S9n[	        U5      SU R                  U5      S.nU R                  R                  R                  X4S9  g)a  Invite a redditor to be a contributor of the live thread.

:param redditor: A redditor name or :class:`.Redditor` instance.
:param permissions: 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
    full permissions.

:raises: :class:`.RedditAPIException` if the invitation already exists.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    redditor = reddit.redditor("spez")

    # "manage" and "settings" permissions
    thread.contributor.invite(redditor, permissions=["manage", "settings"])

.. seealso::

    :meth:`.LiveContributorRelationship.remove_invite` to remove the invite for
    redditor.

live_inviter+   liveupdate_contributor_invitenametyper   dataNr	   r-   r.   r,   strr&   r/   r?   r2   rC   r   r3   rK   s        r    invite"LiveContributorRelationship.inviteH   sa    B }%,,,?M333K@

 	   0r(   c                    [         S   R                  U R                  R                  S9nU R                  R                  R                  U5        g)zAbdicate the live thread contributor position (use with care).

Usage:

.. code-block:: python

    thread = reddit.live("ydwwxneu7vsa")
    thread.contributor.leave()


live_leaver+   Nr>   r@   s     r    leave!LiveContributorRelationship.leaveq   <     |$++t{{~~+>  %r(   c                    [        U[        5      (       a  UR                  OUnSU0n[        S   R	                  U R
                  R                  S9nU R
                  R                  R                  XCS9  g)ak  Remove the redditor from the live thread contributors.

:param redditor: A redditor fullname (e.g., ``"t2_1w72"``) or :class:`.Redditor`
    instance.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    redditor = reddit.redditor("spez")
    thread.contributor.remove(redditor)
    thread.contributor.remove("t2_1w72")  # with fullname

r,   live_remove_contribr+   rJ   N	r1   r   fullnamer	   r-   r.   r,   r/   r?   r2   rC   rY   rK   r3   s        r    remove"LiveContributorRelationship.remove   sc      )38X(F(F8$$Hh,-444G   0r(   c                    [        U[        5      (       a  UR                  OUnSU0n[        S   R	                  U R
                  R                  S9nU R
                  R                  R                  XCS9  g)a  Remove the invite for redditor.

:param redditor: A redditor fullname (e.g., ``"t2_1w72"``) or :class:`.Redditor`
    instance.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    redditor = reddit.redditor("spez")
    thread.contributor.remove_invite(redditor)
    thread.contributor.remove_invite("t2_1w72")  # with fullname

.. seealso::

    :meth:`.LiveContributorRelationship.invite` to invite a redditor to be a
    contributor of the live thread.

r,   live_remove_inviter+   rJ   NrX   rZ   s        r    remove_invite)LiveContributorRelationship.remove_invite   sc    * )38X(F(F8$$Hh+,33t{{~~3F   0r(   c                   [         S   R                  U R                  R                  S9n[	        U5      SU R                  U5      S.nU R                  R                  R                  X4S9  g)a  Update the contributor permissions for ``redditor``.

:param redditor: A redditor name or :class:`.Redditor` instance.
:param permissions: 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 provided (``None``), indicates full permissions.

For example, to grant all permissions to the contributor, try:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    thread.contributor.update("spez")

To grant ``"access"`` and ``"edit"`` permissions (and to remove other
permissions), try:

.. code-block:: python

    thread.contributor.update("spez", permissions=["access", "edit"])

To remove all permissions from the contributor, try:

.. code-block:: python

    subreddit.moderator.update("spez", permissions=[])

live_update_permsr+   liveupdate_contributorrG   rJ   NrL   rN   s        r    update"LiveContributorRelationship.update   sb    H *+22dkknn2EM,33K@

 	   0r(   c                   [         S   R                  U R                  R                  S9n[	        U5      SU R                  U5      S.nU R                  R                  R                  X4S9  g)a  Update the contributor invite permissions for ``redditor``.

:param redditor: A redditor name or :class:`.Redditor` instance.
:param permissions: 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 provided (``None``), indicates full permissions.

For example, to set all permissions to the invitation, try:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    thread.contributor.update_invite("spez")

To set ``"access"`` and ``"edit"`` permissions (and to remove other permissions)
to the invitation, try:

.. code-block:: python

    thread.contributor.update_invite("spez", permissions=["access", "edit"])

To remove all permissions from the invitation, try:

.. code-block:: python

    thread.contributor.update_invite("spez", permissions=[])

rb   r+   rF   rG   rJ   NrL   rN   s        r    update_invite)LiveContributorRelationship.update_invite   sb    H *+22dkknn2EM333K@

 	   0r(   r8   )r   zIterable[str]returnrM   )ri   zlist[praw.models.Redditor]r.   praw.models.LiveThread)rC   str | praw.models.Redditorr   zlist[str] | None)rC   rl   )__name__
__module____qualname____firstlineno____doc__staticmethodr&   r5   r:   rA   r
   rO   rS   r[   r_   rd   rg   __static_attributes__r   r(   r    r   r      s    F6 6C & Z/
 )-	&1,&1 &	&1 0&1P&1*14 Z/
 )-	)1,)1 &	)1 0)1V Z/
 )-	)1,)1 &	)1 0)1r(   r   c                     ^  \ rS rSrSrSr\SS j5       r\SS j5       r\SS j5       r	SS jr
SS jrSS	 jr  S     SU 4S
 jjjrU 4S jrS r    SS jrSS jr    SS jrSrU =r$ )
LiveThreadi  a  An individual :class:`.LiveThread` object.

.. include:: ../../typical_attributes.rst

==================== =========================================================
Attribute            Description
==================== =========================================================
``created_utc``      The creation time of the live thread, in `Unix Time`_.
``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.
==================== =========================================================

.. _unix time: https://en.wikipedia.org/wiki/Unix_time

r,   c                    [        U 5      $ )zProvide an instance of :class:`.LiveThreadContribution`.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    thread.contrib.add("### update")

)LiveThreadContributionr2   s    r    contribLiveThread.contrib  s     &d++r(   c                    [        U 5      $ )a  Provide an instance of :class:`.LiveContributorRelationship`.

You can call the instance to get a list of contributors which is represented as
:class:`.RedditorList` instance consists of :class:`.Redditor` instances. Those
:class:`.Redditor` instances have ``permissions`` attributes as contributors:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    for contributor in thread.contributor():
        # prints `Redditor(name="Acidtwist") ["all"]`
        print(contributor, contributor.permissions)

)r   rx   s    r    contributorLiveThread.contributor+  s      +400r(   c                    [        U 5      $ )a  Provide an instance of :class:`.LiveThreadStream`.

Streams are used to indefinitely retrieve new updates made to a live thread,
like:

.. code-block:: python

    for live_update in reddit.live("ta535s1hq2je").stream.updates():
        print(live_update.body)

Updates are yielded oldest first as :class:`.LiveUpdate`. 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``:

.. code-block:: python

    live_thread = reddit.live("ta535s1hq2je")
    for live_update in live_thread.stream.updates(skip_existing=True):
        print(live_update.author)

)LiveThreadStreamrx   s    r    streamLiveThread.stream=  s    .  %%r(   c                    [        U[        5      (       a  U[        U 5      :H  $ [        XR                  5      =(       a    [        U 5      [        U5      :H  $ )zjReturn whether the other instance equals the current.

.. note::

    This comparison is case sensitive.

)r1   rM   	__class__)r2   others     r    __eq__LiveThread.__eq__V  sA     eS!!CI%%%0LSY#e*5LLr(   c                D    [        U R                  U R                  U5      $ )a  Return a lazy :class:`.LiveUpdate` instance.

:param update_id: A live update ID, e.g.,
    ``"7827987a-c998-11e4-a0b9-22000b6a88d2"``.

Usage:

.. code-block:: python

    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"

)
LiveUpdater/   r,   )r2   	update_ids     r    __getitem__LiveThread.__getitem__b  s    " $,,;;r(   c                j    [        U R                  R                  5      [        [        U 5      5      -  $ )z(Return the hash of the current instance.)hashr   rm   rM   rx   s    r    __hash__LiveThread.__hash__u  s$    DNN++,tCI>>r(   c                   > X#4R                  S5      S:w  a  Sn[        U5      eU(       a  X l        [        TU ]  XS9  g)zInitialize a :class:`.LiveThread` instance.

:param reddit: An instance of :class:`.Reddit`.
:param id: A live thread ID, e.g., ``"ukaeu1ik4sw5"``

Nr   z(Either 'id' or '_data' must be provided._data)count	TypeErrorr,   superr:   )r2   redditr,   r   msgr   s        r    r:   LiveThread.__init__y  sA     ;T"a'<CC. G-r(   c                   > U R                  5       nUS   n[        U 5      " U R                  US9nU R                  R	                  UR                  5        [
        TU ]  5         g )NrK   r   )_fetch_datarI   r/   __dict__rd   r   _fetch)r2   rK   r   r   s      r    r   LiveThread._fetch  sN    !F|T
4<<t4U^^,r(   c                $    SSU R                   0S 4$ )N	liveaboutr,   r+   rx   s    r    _fetch_infoLiveThread._fetch_info  s    T477OT11r(   c                p    [         S   R                  U R                  S9n[        U R                  U40 UD6$ )a  Get submissions linking to the thread.

:param generator_kwargs: keyword arguments passed to :class:`.ListingGenerator`
    constructor.

:returns: A :class:`.ListingGenerator` object which yields :class:`.Submission`
    objects.

Additional keyword arguments are passed in the initialization of
:class:`.ListingGenerator`.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    for submission in thread.discussions(limit=None):
        print(submission.title)

live_discussionsr+   )r	   r-   r,   r   r/   )r2   generator_kwargsr3   s      r    discussionsLiveThread.discussions  s8    . )*11TWW1=cF5EFFr(   c                |    [         S   R                  U R                  S9nU R                  R	                  USU0S9  g)a#  Report the thread violating the Reddit rules.

:param type: One of ``"spam"``, ``"vote-manipulation"``,
    ``"personal-information"``, ``"sexualizing-minors"``, or
    ``"site-breaking"``.

Usage:

.. code-block:: python

    thread = reddit.live("xyu8kmjvfrww")
    thread.report("spam")

live_reportr+   rI   rJ   N)r	   r-   r,   r/   r?   )r2   rI   r3   s      r    reportLiveThread.report  s;     }%,,,8#VTN3r(   c              +     #    [         S   R                  U R                  S9n[        U R                  U40 UD6 H  nXl        Uv   M     g7f)aQ  Return a :class:`.ListingGenerator` yields :class:`.LiveUpdate` s.

:param generator_kwargs: keyword arguments passed to :class:`.ListingGenerator`
    constructor.

:returns: A :class:`.ListingGenerator` object which yields :class:`.LiveUpdate`
    objects.

Additional keyword arguments are passed in the initialization of
:class:`.ListingGenerator`.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    after = "LiveUpdate_fefb3dae-7534-11e6-b259-0ef8c7233633"
    for submission in thread.updates(limit=5, params={"after": after}):
        print(submission.body)

live_updatesr+   N)r	   r-   r,   r   r/   _thread)r2   r   r3   rd   s       r    updatesLiveThread.updates  sI     0 ~&---9&t||SM<LMF!NL Ns   A
Ar+   )ri   z.praw.models.reddit.live.LiveThreadContribution)ri   z3praw.models.reddit.live.LiveContributorRelationship)ri   z(praw.models.reddit.live.LiveThreadStream)r   zstr | praw.models.LiveThreadri   bool)r   rM   ri   praw.models.LiveUpdate)ri   int)NN)r   praw.Redditr,   
str | Noner   dict[str, Any] | None)r   str | int | dict[str, str]ri   z Iterator[praw.models.Submission])rI   rM   )r   r   ri    Iterator[praw.models.LiveUpdate])rm   rn   ro   rp   rq   	STR_FIELDr   ry   r|   r   r   r   r   r:   r   r   r   r   r   rs   __classcell__r   s   @r    ru   ru     s    & I, , 1 1" & &0
M<&? '+	.. . %	. .&2G"<G	)G44$"<	) r(   ru   c                  x    \ rS rSrSrSS jrSS jrS r\" SSSS	5      S
S
S
S
S.         SS jj5       r	Sr
g
)rw   i  zCProvides a set of contribution functions to a :class:`.LiveThread`.c                    Xl         g)aG  Initialize a :class:`.LiveThreadContribution` instance.

:param thread: An instance of :class:`.LiveThread`.

This instance can be retrieved through ``thread.contrib`` where thread is a
:class:`.LiveThread` instance. E.g.,

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    thread.contrib.add("### update")

Nr8   r9   s     r    r:   LiveThreadContribution.__init__  s	     r(   c                    [         S   R                  U R                  R                  S9nU R                  R                  R                  USU0S9  g)zAdd an update to the live thread.

:param body: The Markdown formatted content for the update.

Usage:

.. code-block:: python

    thread = reddit.live("ydwwxneu7vsa")
    thread.contrib.add("test `LiveThreadContribution.add()`")

live_add_updater+   bodyrJ   Nr>   )r2   r   r3   s      r    addLiveThreadContribution.add  sF     ()00DKKNN0C  FD> :r(   c                    [         S   R                  U R                  R                  S9nU R                  R                  R                  U5        g)zClose the live thread permanently (cannot be undone).

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    thread.contrib.close()


live_closer+   Nr>   r@   s     r    closeLiveThreadContribution.close  rU   r(   titledescriptionnsfw	resourcesN)r   r   r   r   c          	     \   UUUUS.nUR                  U5        [        S UR                  5        5       5      (       a  g[        U R                  R
                  U R                  R                  5      nUR                  5        VV	s0 s H  u  pXc  [        Xx5      OU	_M     n
nn	[        S   R                  U R                  R                  S9nU R                  R
                  R                  XR                  5       S9  U R                  R                  " U
R                  5       6   gs  sn	nf )a  Update settings of the live thread.

:param description: The live thread's description (default: ``None``).
:param nsfw: Indicate whether this thread is not safe for work (default:
    ``None``).
:param resources: Markdown formatted information that is useful for the live
    thread (default: ``None``).
:param title: The title of the live thread (default: ``None``).

Does nothing if no arguments are provided.

Each setting will maintain its current value if ``None`` is specified.

Additional keyword arguments can be provided to handle new settings as Reddit
introduces them.

Usage:

.. code-block:: python

    thread = reddit.live("xyu8kmjvfrww")

    # update 'title' and 'nsfw'
    updated_thread = thread.contrib.update(title=new_title, nsfw=True)

If Reddit introduces new settings, you must specify ``None`` for the setting you
want to maintain:

.. code-block:: python

    # update 'nsfw' and maintain new setting 'foo'
    thread.contrib.update(nsfw=True, foo=None)

)r   r   r   r   c              3  (   #    U  H  oS L v   M
     g 7f)Nr   )r   values     r    r!   0LiveThreadContribution.update.<locals>.<genexpr>D  s     <*;}*;s   Nlive_update_threadr+   rJ   )rd   r   valuesru   r.   r/   r,   itemsgetattrr	   r-   r?   copy_reset_attributeskeys)r2   r   r   r   r   other_settingssettingsr.   keyr   rK   r3   s               r    rd   LiveThreadContribution.update  s    Z &"	
 	'<(//*;<<<DKK//@ 'nn.
.
 %EA. 	 

 +,33t{{~~3F  99; 7%%tyy{3
s   D(r8   rj   )r   rM   )
r   r   r   zbool | Noner   r   r   r   r   r   )rm   rn   ro   rp   rq   r:   r   r   r
   rd   rs   r   r(   r    rw   rw     st    M ; & WmV[A #'  $ >4  >4 	>4
 >4 >4 %>4 B>4r(   rw   c                  4    \ rS rSrSrSS jr    SS jrSrg)	r   iS  zProvides a :class:`.LiveThread` stream.

Usually used via:

.. code-block:: python

    for live_update in reddit.live("ta535s1hq2je").stream.updates():
        print(live_update.body)

c                    Xl         g)ztInitialize a :class:`.LiveThreadStream` instance.

:param live_thread: The live thread associated with the stream.

Nlive_thread)r2   r   s     r    r:   LiveThreadStream.__init___  s
     'r(   c                B    [        U R                  R                  40 UD6$ )a  Yield new updates to the live thread as they become available.

:param skip_existing: Set to ``True`` to only fetch items created after the
    stream (default: ``False``).

As with :meth:`.LiveThread.updates()`, updates are yielded as
:class:`.LiveUpdate`.

Updates are yielded oldest first. Up to 100 historical updates will initially be
returned.

Keyword arguments are passed to :func:`.stream_generator`.

For example, to retrieve all new updates made to the ``"ta535s1hq2je"`` live
thread, try:

.. code-block:: python

    for live_update in reddit.live("ta535s1hq2je").stream.updates():
        print(live_update.body)

To only retrieve new updates starting from when the stream is created, pass
``skip_existing=True``:

.. code-block:: python

    live_thread = reddit.live("ta535s1hq2je")
    for live_update in live_thread.stream.updates(skip_existing=True):
        print(live_update.author)

)r   r   r   )r2   stream_optionss     r    r   LiveThreadStream.updatesg  s!    D   0 0 8 8KNKKr(   r   N)r   rk   )r   zdict[str, Any]ri   r   )rm   rn   ro   rp   rq   r:   r   rs   r   r(   r    r   r   S  s$    	'"L ."L	)"Lr(   r   c                  .    \ rS rSrSrSS jrS rS rSrg)	LiveUpdateContributioni  zAProvides a set of contribution functions to :class:`.LiveUpdate`.c                    Xl         g)a  Initialize a :class:`.LiveUpdateContribution` instance.

:param update: An instance of :class:`.LiveUpdate`.

This instance can be retrieved through ``update.contrib`` where update is a
:class:`.LiveUpdate` instance. E.g.,

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    update = thread["7827987a-c998-11e4-a0b9-22000b6a88d2"]
    update.contrib  # LiveUpdateContribution instance
    update.contrib.remove()

Nrd   )r2   rd   s     r    r:   LiveUpdateContribution.__init__  s	      r(   c                    [         S   R                  U R                  R                  R                  S9nSU R                  R
                  0nU R                  R                  R                  R                  XS9  g)zRemove a live update.

Usage:

.. code-block:: python

    thread = reddit.live("ydwwxneu7vsa")
    update = thread["6854605a-efec-11e6-b0c7-0eafac4ff094"]
    update.contrib.remove()

live_remove_updater+   r,   rJ   Nr	   r-   rd   r.   r,   rY   r/   r?   r2   r3   rK   s      r    r[   LiveUpdateContribution.remove  sb     +,33t{{7I7I7L7L3Mdkk**+""'''7r(   c                    [         S   R                  U R                  R                  R                  S9nSU R                  R
                  0nU R                  R                  R                  R                  XS9  g)a  Strike a content of a live update.

.. code-block:: python

    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 :py:class:`AttributeError`. See :class:`.LiveUpdate` for details.

live_striker+   r,   rJ   Nr   r   s      r    strikeLiveUpdateContribution.strike  sa    $ }%,,0B0B0E0E,Fdkk**+""'''7r(   r   N)rd   r   )	rm   rn   ro   rp   rq   r:   r[   r   rs   r   r(   r    r   r     s    K$8 8r(   r   c                     ^  \ rS rSrSrSrS r\S
S j5       r\	SS j5       r
   S       SU 4S jjjrSU 4S jjrU 4S jrS	rU =r$ )r   i  a  An individual :class:`.LiveUpdate` object.

.. include:: ../../typical_attributes.rst

=============== ===================================================================
Attribute       Description
=============== ===================================================================
``author``      The :class:`.Redditor` who made the update.
``body``        Body of the update, as Markdown.
``body_html``   Body of the update, as HTML.
``created_utc`` The time the update was created, as `Unix Time`_.
``stricken``    A ``bool`` representing whether or not the update was stricken (see
                :meth:`.strike`).
=============== ===================================================================

.. _unix time: https://en.wikipedia.org/wiki/Unix_time

r,   c                    [        U 5      $ )zProvide an instance of :class:`.LiveUpdateContribution`.

Usage:

.. code-block:: python

    thread = reddit.live("ukaeu1ik4sw5")
    update = thread["7827987a-c998-11e4-a0b9-22000b6a88d2"]
    update.contrib  # LiveUpdateContribution instance

)r   rx   s    r    ry   LiveUpdate.contrib  s     &d++r(   c                    U R                   $ )z@Return :class:`.LiveThread` object the update object belongs to.)r   rx   s    r    r.   LiveUpdate.thread  s     ||r(   c                   > Ub  [         TU ]  XSS9  gU(       a7  U(       a0  X0l        [         TU ]  USS9  [        U R                  U5      U l        gSn[        U5      e)a@  Initialize a :class:`.LiveUpdate` instance.

Either ``thread_id`` and ``update_id``, or ``_data`` must be provided.

:param reddit: An instance of :class:`.Reddit`.
:param thread_id: A live thread ID, e.g., ``"ukaeu1ik4sw5"``.
:param update_id: A live update ID, e.g.,
    ``"7827987a-c998-11e4-a0b9-22000b6a88d2"``.

Usage:

.. code-block:: python

    update = LiveUpdate(reddit, "ukaeu1ik4sw5", "7827987a-c998-11e4-a0b9-22000b6a88d2")
    update.thread  # LiveThread(id="ukaeu1ik4sw5")
    update.id  # "7827987a-c998-11e4-a0b9-22000b6a88d2"
    update.author  # "umbrae"

NT)r   _fetchedr   z@Either 'thread_id' and 'update_id', or '_data' must be provided.)r   r:   r,   ru   r/   r   r   )r2   r   	thread_idr   r   r   r   s         r    r:   LiveUpdate.__init__  s\    4  GV4@9GGV40%dllI>DLTCC. r(   c                X   > US:X  a  [        U R                  US9n[        TU ]  X5        g)zObjectify author.author)rH   N)r   r/   r   __setattr__)r2   	attributer   r   s      r    r   LiveUpdate.__setattr__  s(     T\\6EI-r(   c                  > [         S   R                  U R                  R                  U R                  S9nU R                  R                  U5      S   nU R                  R                  UR                  5        [        TU ]%  5         g )N
live_focus)r   r   r   )
r	   r-   r.   r,   r/   r0   r   rd   r   r   )r2   r3   r   r   s      r    r   LiveUpdate._fetch   se    |$++dkknnPTPWPW+X  %a(U^^,r(   )r   r,   )ri   z.praw.models.reddit.live.LiveUpdateContribution)ri   ru   )NNN)r   r   r   r   r   r   r   r   )r   rM   r   r   )rm   rn   ro   rp   rq   r   _kindr   ry   propertyr.   r:   r   r   rs   r   r   s   @r    r   r     s    & IE, ,   !% $'+%!%! %! 	%!
 %%! %!N. r(   r   )!rq   
__future__r   typingr   r   r   r   constr	   utilr
   
util.cacher   list.redditorr   listing.generatorr   r   baser   mixinsr   rC   r   praw.modelsprawr   ru   rw   r   r   r   r   r(   r    <module>r     s    # " 9 9  # ( ( 0 #  ! o1 o1dV Vrp4 p4f6L 6Lr98 98x\
 \r(   