reddit.redditors¶
- class asyncpraw.models.Redditors(reddit: asyncpraw.Reddit, _data: dict[str, Any] | None)¶
Redditors is a Listing class that provides various
Redditor
lists.- __init__(reddit: asyncpraw.Reddit, _data: dict[str, Any] | None)¶
Initialize a
AsyncPRAWBase
instance.- Parameters:
reddit – An instance of
Reddit
.
- new(**generator_kwargs: str | int | dict[str, str]) AsyncIterator[asyncpraw.models.Subreddit] ¶
Return a
ListingGenerator
for newRedditors
.Additional keyword arguments are passed in the initialization of
ListingGenerator
.
- classmethod parse(data: dict[str, Any], reddit: asyncpraw.Reddit) AsyncPRAWBase ¶
Return an instance of
cls
fromdata
.- Parameters:
data – The structured data.
reddit – An instance of
Reddit
.
- async for ... in partial_redditors(ids: Iterable[str]) AsyncIterator[PartialRedditor] ¶
Get user summary data by redditor IDs.
- Parameters:
ids – An iterable of redditor fullname IDs.
- Returns:
A iterator producing
PartialRedditor
objects.
Each ID must be prefixed with
t2_
.Invalid IDs are ignored by the server.
- popular(**generator_kwargs: str | int | dict[str, str]) AsyncIterator[asyncpraw.models.Subreddit] ¶
Return a
ListingGenerator
for popularRedditors
.Additional keyword arguments are passed in the initialization of
ListingGenerator
.
- search(query: str, **generator_kwargs: str | int | dict[str, str]) AsyncIterator[asyncpraw.models.Subreddit] ¶
Return a
ListingGenerator
of Redditors forquery
.- Parameters:
query – The query string to filter Redditors by.
- Returns:
Redditor
s.
Additional keyword arguments are passed in the initialization of
ListingGenerator
.
- stream(**stream_options: str | int | dict[str, str]) AsyncIterator[asyncpraw.models.Subreddit] ¶
Yield new Redditors as they are created.
Redditors are yielded oldest first. Up to 100 historical Redditors will initially be returned.
Keyword arguments are passed to
stream_generator()
.