SubredditRelationship¶
- class asyncpraw.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:
subreddit = await reddit.subreddit("test") async for ban in subreddit.banned(): print("{ban}: {ban.note}")
- Parameters:
subreddit (asyncpraw.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.
- await add(redditor, **other_settings)¶
Add
redditorto this relationship.