SubredditRelationship¶
- class praw.models.reddit.subreddit.SubredditRelationship(subreddit, relationship)¶
Represents a relationship between a
RedditorandSubreddit.Instances of this class can be iterated through in order to discover the Redditors that make up the relationship.
For example, banned users of a subreddit can be iterated through like so:
for ban in reddit.subreddit("test").banned(): print(f"{ban}: {ban.note}")
- Parameters:
subreddit (models.Subreddit)
relationship (str)
- __call__(redditor=None, **generator_kwargs)¶
Return a
ListingGeneratorforRedditors in the relationship.- Parameters:
- Return type:
Additional keyword arguments are passed in the initialization of
ListingGenerator.
- __init__(subreddit, relationship)¶
Initialize a
SubredditRelationshipinstance.
- add(redditor, **other_settings)¶
Add
redditorto this relationship.