ContributorRelationship
- class praw.models.reddit.subreddit.ContributorRelationship(subreddit: praw.models.Subreddit, relationship: str)
Provides methods to interact with a
Subreddit
’s contributors.Contributors are also known as approved submitters.
Contributors of a subreddit can be iterated through like so:
for contributor in reddit.subreddit("test").contributor(): print(contributor)
- __call__(redditor: praw.models.Redditor | str | None = None, **generator_kwargs) Iterator[praw.models.Redditor]
Return a
ListingGenerator
forRedditor
s in the relationship.- Parameters:
redditor – When provided, yield at most a single
Redditor
instance. This is useful to confirm if a relationship exists, or to fetch the metadata associated with a particular relationship (default:None
).
Additional keyword arguments are passed in the initialization of
ListingGenerator
.
- __init__(subreddit: praw.models.Subreddit, relationship: str)
Initialize a
SubredditRelationship
instance.- Parameters:
subreddit – The
Subreddit
for the relationship.relationship – The name of the relationship.
- add(redditor: str | praw.models.Redditor, **other_settings: Any)
Add
redditor
to this relationship.- Parameters:
redditor – A redditor name or
Redditor
instance.
- leave()
Abdicate the contributor position.
- remove(redditor: str | praw.models.Redditor)
Remove
redditor
from this relationship.- Parameters:
redditor – A redditor name or
Redditor
instance.