reddit.multireddit

class asyncpraw.models.MultiredditHelper(reddit: asyncpraw.Reddit, _data: Optional[Dict[str, Any]])

Provide a set of functions to interact with multireddits.

await __call__(redditor: Union[str, asyncpraw.models.Redditor], name: str, fetch: bool = False) asyncpraw.models.Multireddit

Return an instance of Multireddit.

If you need the object fetched right away (e.g., to access an attribute) you can do:

multireddit = await reddit.multireddit("redditor", "multi", fetch=True)
async for comment in multireddit.comments(limit=25):
    print(comment.author)
Parameters
  • redditor – A redditor name or Redditor instance who owns the multireddit.

  • name – The name of the multireddit.

  • fetch – Determines if Async PRAW will fetch the object (default: False).

__init__(reddit: asyncpraw.Reddit, _data: Optional[Dict[str, Any]])

Initialize a AsyncPRAWBase instance.

Parameters

reddit – An instance of Reddit.

await create(display_name: str, subreddits: Union[str, asyncpraw.models.Subreddit], description_md: Optional[str] = None, icon_name: Optional[str] = None, key_color: Optional[str] = None, visibility: str = 'private', weighting_scheme: str = 'classic') asyncpraw.models.Multireddit

Create a new Multireddit.

Parameters
  • display_name – The display name for the new multireddit.

  • subreddits – Subreddits to add to the new multireddit. Can be a list of either Subreddit instances or subreddit display names.

  • description_md – Description for the new multireddit, formatted in markdown.

  • icon_name – Can be one of: "art and design", "ask", "books", "business", "cars", "comics", "cute animals", "diy", "entertainment", "food and drink", "funny", "games", "grooming", "health", "life advice", "military", "models pinup", "music", "news", "philosophy", "pictures and gifs", "science", "shopping", "sports", "style", "tech", "travel", "unusual stories", "video", or None.

  • key_color – RGB hex color code of the form "#FFFFFF".

  • visibility – Can be one of: "hidden", "private", or "public" (default: "private").

  • weighting_scheme – Can be one of: "classic" or "fresh" (default: "classic").

Returns

The new Multireddit object.

classmethod parse(data: Dict[str, Any], reddit: asyncpraw.Reddit) Any

Return an instance of cls from data.

Parameters
  • data – The structured data.

  • reddit – An instance of Reddit.