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

Adding pagination for credential_list and user_credential_list #739

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

tylern4
Copy link
Contributor

@tylern4 tylern4 commented Jun 2, 2023

This is similar to #738 from the ticket I opened and @derek-globus fixed.

My next goal was to list the collections and found it wasn't paginated so I could only get the first page. I added in similar changes to the other pull request to make these two methods paginated and tested get_collection_list like before.

data = client.paginated.get_collection_list(page_size=1)
for idx, page in enumerate(data.pages()):
    print(f"Page {idx}: {len(page['data'])} item")

Page 0: 1 item
Page 1: 1 item

📚 Documentation preview 📚: https://globus-sdk-python--739.org.readthedocs.build/en/739/

@derek-globus derek-globus added the no-news-is-good-news This change does not require a news file label Jun 5, 2023
@derek-globus
Copy link
Contributor

derek-globus commented Jun 5, 2023

Thanks for the contribution, Nick.

I've double checked the iteration on both of those routes locally & initiated our automated testing.
Assuming that passes without issue, I'll merge this & ensure we get it into v3.20.0

@derek-globus derek-globus merged commit 2b4c116 into globus:main Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-news-is-good-news This change does not require a news file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants