Skip to content

fix: correct pagination import paths and method names in README#569

Open
nsingh347X wants to merge 1 commit into
okta:masterfrom
nsingh347X:fix/pagination-docs-incorrect-import-and-method
Open

fix: correct pagination import paths and method names in README#569
nsingh347X wants to merge 1 commit into
okta:masterfrom
nsingh347X:fix/pagination-docs-incorrect-import-and-method

Conversation

@nsingh347X

Copy link
Copy Markdown

Summary:
The pagination section of the README contains two incorrect code examples that cause errors for users following the documentation.

Issue 1 - Wrong import path
The README documents from okta import paginate_all, from okta import paginate_pages and from okta import PaginationHelper. All three throw an ImportError because these are defined in okta/pagination.py but not exported from the top-level oktapackage.

Fix: Import from okta.pagination instead:
from okta.pagination import paginate_all
from okta.pagination import paginate_pages
from okta.pagination import PaginationHelper

Issue 2 - Non-existent method name
The README references list_users_with_http_info throughout the pagination examples. This method does not exist on the client - it throws AttributeError: 'Client' object has no attribute 'list_users_with_http_info'. The correct method is list_users, which already returns a (data, resp, error) tuple including the response headers needed for pagination.

Fix:

Before

async for user in paginate_all(client.list_users_with_http_info, limit=200):

After

async for user in paginate_all(client.list_users, limit=200):

Verification
Both fixes verified against SDK v3.1.0 on Python 3.9.

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.

1 participant