MoreComments¶
This section describes the usage and members of the MoreComments model.
MoreComments stores a list of IDs pointing to Comment and further MoreComments.
These can be retrieved using the comments() method or by iterating over the instance
asynchronously:
comments = await more_comments.comments()
# or using asynchronous list comprehension:
comments = [c async for c in more_comments]
- class apraw.models.MoreComments(reddit: Reddit, data: Dict[str, Any], link_id: str)¶
Represents the model for more comments in a thread.
Typical Attributes
This table describes attributes that typically belong to objects of this class. Attributes are dynamically provided by the
aPRAWBaseclass and may vary depending on the status of the response and expected objects.Attribute
Description
countThe number of comment or more children items in this thread.
nameThe fullname that references this more comments model.
idThe ID of this more comments model.
parent_idThe ID of this more comments’ parent submission or comment.
depthThe depth this more comments model goes into.
childrenA list of comment and more comment IDs available in this thread.
- async comments() List[Union[apraw.models.reddit.comment.Comment, apraw.models.reddit.more_comments.MoreComments]]¶
Retrieve a list of all the
Commentand furtherMoreCommentsin this thread.- Returns
comments – A list of all the
Commentand furtherMoreCommentsin this thread.- Return type
List[Union[Comment, MoreComments]]
- async fetch()¶
Fetch all the comments in this MoreComments thread.
- property fullname¶
Get the ID prepended with its kind.
- Returns
fullname – The item’s ID prepended with its kind such as t1_.
- Return type
str
- async link() Submission¶
Retrieve the submission this item belongs to as a
Submission.- Returns
submission – The item’s parent submission.
- Return type
- async parent() Union[apraw.models.reddit.submission.Submission, apraw.models.reddit.comment.Comment]¶
Retrieve the parent submission or comment of this MoreComments object.
- Returns
parent – The parent submission or comment of this MoreComments object.
- Return type
- async submission() Submission¶
Retrieve the submission this item belongs to as a
Submission.- Returns
submission – The item’s parent submission.
- Return type