| 1 |
import typing as t |
| 2 |
|
| 3 |
from .add_content_directive import AddContentDirective |
| 4 |
|
| 5 |
|
| 6 |
class PaginatedUsage(AddContentDirective): |
| 7 |
has_content = False |
| 8 |
required_arguments = 1 |
| 9 |
optional_arguments = 0 |
| 10 |
|
| 11 |
def gen_rst(self) -> t.Iterator[str]: |
| 12 |
yield "This method supports paginated access. " |
| 13 |
yield "To use the paginated variant, give the same arguments as normal, " |
| 14 |
yield "but prefix the method name with ``paginated``, as in" |
| 15 |
yield "" |
| 16 |
yield ".. code-block::" |
| 17 |
yield "" |
| 18 |
yield f" client.paginated.{self.arguments[0]}(...)" |
| 19 |
yield "" |
| 20 |
yield "For more information, see" |
| 21 |
yield ":ref:`how to make paginated calls <making_paginated_calls>`." |