Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add end_page arg to Pro API Paginator #8

Merged
merged 4 commits into from
Sep 14, 2023
Merged

Add end_page arg to Pro API Paginator #8

merged 4 commits into from
Sep 14, 2023

Conversation

brysontyrrell
Copy link
Collaborator

This adds an optional end_page argument to the Pro API Paginator allowing for limiting pages returned, or selecting a range of pages in an operation.

This example has a full result of 10 pages (0-9). This paginator will skip pages 0-3, return pages 4-7, and stop.

paginator = Paginator(
    api_client=client.pro_api,
    resource_path="v1/computers-inventory",
    page_size=100,
    start_page=4,
    end_page=7
)

@brysontyrrell brysontyrrell merged commit fb3cb9e into main Sep 14, 2023
1 check passed
@brysontyrrell brysontyrrell deleted the add-end-page branch September 14, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants