reddit.multireddit

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

Provide a set of functions to interact with Multireddits.

await __call__(redditor: Union[str, asyncpraw.models.reddit.redditor.Redditor], name: str, fetch: bool = False) → asyncpraw.models.reddit.multi.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 (e.g., "spez") or Redditor instance who owns the multireddit.

  • name – The name of the multireddit.

  • fetch – Determines if the object is lazily loaded (default: False).

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

Initialize a PRAWModel instance.

Parameters

reddit – An instance of Reddit.

await create(display_name: str, subreddits: Union[str, asyncpraw.models.reddit.subreddit.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.reddit.multi.Multireddit

Create a new multireddit.

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

  • subreddits – Subreddits to add to the new multireddit.

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

  • icon_name – (Optional) 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 – (Optional) RGB hex color code of the form "#FFFFFF".

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

  • weighting_scheme – (Optional) Can be one of: classic, fresh (default: classic).

Returns

The new Multireddit object.

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

Return an instance of cls from data.

Parameters
  • data – The structured data.

  • reddit – An instance of Reddit.