sources.helpers.rest_client
paginate
def paginate(url: str,
method: HTTPMethodBasic = "GET",
headers: Optional[Dict[str, str]] = None,
params: Optional[Dict[str, Any]] = None,
json: Optional[Dict[str, Any]] = None,
auth: AuthConfigBase = None,
paginator: Optional[BasePaginator] = None,
data_selector: Optional[jsonpath.TJsonPath] = None,
hooks: Optional[Hooks] = None) -> Iterator[PageData[Any]]
Paginate over a REST API endpoint.
Arguments:
url
- URL to paginate over.**kwargs
- Keyword arguments to pass toRESTClient.paginate
.
Returns:
Iterator[Page]
- Iterator over pages.