Redditor¶
This section describes the usage and members of the Redditor model.
A Redditor can be instantiated as follows:
sub = await reddit.redditor("aprawbot")
-
class
apraw.models.Redditor(reddit: Reddit, data: Dict)¶ The model representing Redditors.
- reddit: Reddit
- The
Redditinstance with which requests are made. - data: Dict
- The data obtained from the /about endpoint.
- kind: str
- The item’s kind / type.
- comments: ListingGenerator
- Returns an instance of
ListingGeneratormapped to fetch the Redditor’s comments. - submissions: ListingGenerator
- Returns an instance of
ListingGeneratormapped to fetch the Redditor’s submission. - subreddit: Sureddit
- An instance of
Subredditfor the Redditor’s profile subreddit.
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 comment_karmaThe amount of comment karma the Redditor has obtained. created_utcThe date on which the Redditor was created in UTC datetime.createdThe timestamp of when the Redditor was created. has_verified_emailWhether the Redditor has a verified email address. icon_imgA URL to the Redditor’s icon image if applicable. idThe Redditor’s ID (without kind). is_employeeWhether the Redditor is a Reddit employee. is_friendWhether the Redditor has been added as a friend. is_goldWhether the Redditor is a Reddit gold member. is_modWhether the Redditor is a moderator in a subreddit. is_suspendedWhether the Redditor has been suspended. link_karmaThe amount of link karma the Redditor has obtained. nameThe Redditor’s username. pref_show_snoovatarWhether to show the Redditor’s Snoovatar in place of their icon. verifiedWhether the Redditor is verified. Warning
Suspended Redditors only return
is_suspendedandname.-
message(subject, text, from_sr='') → Dict¶ Message the Redditor.
Parameters: - subject (str) – The subject of the message.
- text (str) – The text contents of the message in markdown.
- from_sr (str) – The subreddit the message is being sent from if applicable.
Returns: resp – The response data returned from the endpoint.
Return type: Dict
-
moderated_subreddits(**kwargs) → Subreddit¶ Yields the subreddits the Redditor moderates.
Parameters: kwargs (**Dict) – kwargsto be used as query parameters.Yields: subreddit (Subreddit) – A subreddit the user moderates.