MCPcopy Index your code
hub / github.com/praw-dev/praw / __call__

Method __call__

praw/models/mod_notes.py:305–452  ·  view source on GitHub ↗

Get note(s) for each subreddit/user pair, or ``None`` if they don't have any. :param all_notes: Whether to return all notes or only the latest note for each subreddit/redditor pair (default: ``False``). .. note:: Setting this to ``True`` will result

(
        self,
        *,
        all_notes: bool = False,
        pairs: list[tuple[Subreddit | str, Redditor | str]] | None = None,
        redditors: list[Redditor | str] | None = None,
        subreddits: list[Subreddit | str] | None = None,
        things: list[Comment | Submission] | None = None,
        **generator_kwargs: Any,
    )

Source from the content-addressed store, hash-verified

303 """
304
305 def __call__(
306 self,
307 *,
308 all_notes: bool = False,
309 pairs: list[tuple[Subreddit | str, Redditor | str]] | None = None,
310 redditors: list[Redditor | str] | None = None,
311 subreddits: list[Subreddit | str] | None = None,
312 things: list[Comment | Submission] | None = None,
313 **generator_kwargs: Any,
314 ) -> Iterator[models.ModNote]:
315 """Get note(s) for each subreddit/user pair, or ``None`` if they don't have any.
316
317 :param all_notes: Whether to return all notes or only the latest note for each
318 subreddit/redditor pair (default: ``False``).
319
320 .. note::
321
322 Setting this to ``True`` will result in a request for each unique
323 subreddit/redditor pair. If ``subreddits`` and ``redditors`` are
324 provided, this will make a request equivalent to number of redditors
325 multiplied by the number of subreddits.
326
327 :param pairs: A list of subreddit/redditor tuples.
328
329 .. note::
330
331 Required if ``subreddits``, ``redditors``, nor ``things`` are provided.
332
333 :param redditors: A list of redditors to return notes for. This parameter is
334 used in tandem with ``subreddits`` to get notes from multiple subreddits for
335 each of the provided redditors.
336
337 .. note::
338
339 Required if ``items`` or ``things`` is not provided or if ``subreddits``
340 **is** provided.
341
342 :param subreddits: A list of subreddits to return notes for. This parameter is
343 used in tandem with ``redditors`` to get notes for multiple redditors from
344 each of the provided subreddits.
345
346 .. note::
347
348 Required if ``items`` or ``things`` is not provided or if ``redditors``
349 **is** provided.
350
351 :param things: A list of comments and/or submissions to return notes for.
352 :param generator_kwargs: Additional keyword arguments passed to the generator.
353 This parameter is ignored when ``all_notes`` is ``False``.
354
355 :returns: A generator that yields the most recent :class:`.ModNote` (or ``None``
356 if the user doesn't have any notes) per entry in their relative order. If
357 ``all_notes`` is ``True``, this will yield all notes for each entry.
358
359 .. note::
360
361 This method will merge the subreddits and redditors provided from ``pairs``,
362 ``redditors``, ``subreddits``, and ``things``.

Callers

nothing calls this directly

Calls 1

_notesMethod · 0.80

Tested by

no test coverage detected