MCPcopy Create free account
hub / github.com/praw-dev/praw / LiveThread

Class LiveThread

praw/models/reddit/live.py:262–473  ·  view source on GitHub ↗

An individual :class:`.LiveThread` object. .. include:: ../../typical_attributes.rst ==================== ========================================================= Attribute Description ==================== ========================================================= ``

Source from the content-addressed store, hash-verified

260
261
262class LiveThread(CreatedMixin, RedditBase):
263 """An individual :class:`.LiveThread` object.
264
265 .. include:: ../../typical_attributes.rst
266
267 ==================== =========================================================
268 Attribute Description
269 ==================== =========================================================
270 ``created_utc`` The creation time of the live thread, in `Unix Time`_.
271 ``description`` Description of the live thread, as Markdown.
272 ``description_html`` Description of the live thread, as HTML.
273 ``id`` The ID of the live thread.
274 ``nsfw`` A ``bool`` representing whether or not the live thread is
275 marked as NSFW.
276 ==================== =========================================================
277
278 .. _unix time: https://en.wikipedia.org/wiki/Unix_time
279
280 """
281
282 STR_FIELD = "id"
283
284 @cachedproperty
285 def contrib(self) -> LiveThreadContribution:
286 """Provide an instance of :class:`.LiveThreadContribution`.
287
288 Usage:
289
290 .. code-block:: python
291
292 thread = reddit.live("ukaeu1ik4sw5")
293 thread.contrib.add("### update")
294
295 """
296 return LiveThreadContribution(self)
297
298 @cachedproperty
299 def contributor(self) -> LiveContributorRelationship:
300 """Provide an instance of :class:`.LiveContributorRelationship`.
301
302 You can call the instance to get a list of contributors which is represented as
303 :class:`.RedditorList` instance consists of :class:`.Redditor` instances. Those
304 :class:`.Redditor` instances have ``permissions`` attributes as contributors:
305
306 .. code-block:: python
307
308 thread = reddit.live("ukaeu1ik4sw5")
309 for contributor in thread.contributor():
310 # prints `Redditor(name="Acidtwist") ["all"]`
311 print(contributor, contributor.permissions)
312
313 """
314 return LiveContributorRelationship(self)
315
316 @cachedproperty
317 def stream(self) -> LiveThreadStream:
318 """Provide an instance of :class:`.LiveThreadStream`.
319

Callers 15

__call__Method · 0.90
test_accept_inviteMethod · 0.90
test_invite__limitedMethod · 0.90
test_invite__noneMethod · 0.90
test_invite__redditorMethod · 0.90
test_leaveMethod · 0.90
test_remove__fullnameMethod · 0.90
test_remove__redditorMethod · 0.90

Calls

no outgoing calls

Tested by 15

test_accept_inviteMethod · 0.72
test_invite__limitedMethod · 0.72
test_invite__noneMethod · 0.72
test_invite__redditorMethod · 0.72
test_leaveMethod · 0.72
test_remove__fullnameMethod · 0.72
test_remove__redditorMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…