ContributorRelationship

class praw.models.reddit.subreddit.ContributorRelationship(subreddit, relationship)

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)
Parameters:
__call__(redditor=None, **generator_kwargs)

Return a ListingGenerator for Redditors in the relationship.

Parameters:
  • redditor (str | Redditor | None) – 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).

  • generator_kwargs (Any)

Return type:

Iterator[Redditor]

Additional keyword arguments are passed in the initialization of ListingGenerator.

__init__(subreddit, relationship)

Initialize a SubredditRelationship instance.

Parameters:
  • subreddit (Subreddit) – The Subreddit for the relationship.

  • relationship (str) – The name of the relationship.

Return type:

None

add(redditor, **other_settings)

Add redditor to this relationship.

Parameters:
Return type:

None

leave()

Abdicate the contributor position.

Return type:

None

remove(redditor)

Remove redditor from this relationship.

Parameters:

redditor (str | Redditor) – A redditor name or Redditor instance.

Return type:

None