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

group pagination not part of the code #85

Closed
gcoxmoz opened this issue Feb 22, 2019 · 1 comment
Closed

group pagination not part of the code #85

gcoxmoz opened this issue Feb 22, 2019 · 1 comment

Comments

@gcoxmoz
Copy link

gcoxmoz commented Feb 22, 2019

Hi,

In duo_client/admin.py, there are get_user_groups and get_user_groups_iterator which (via json_paging_api_call in duo_client/client.py) seem to be doing the pagination for us (kinda already touched on in #63).

Minor note: per https://duo.com/docs/adminapi#retrieve-groups-by-user-id, get_user_groups should have limits of 100/500, but the API shows None. I don't particularly care here - you're doing the paging for me, so, "cool!"

What I'm opening an issue over is, get_group_users looks the same as get_user_groups from the docs https://duo.com/docs/adminapi#v2-groups-get-users. ("Same" as in, both API calls take optional paging-related parameters, with limits of 100/500 defined; obviously they return different data.) But there's no similar iterator/listmaker offered for get_group_users - you get back one limit-sized slurp of data. I'm not seeing the metadata get to me from a call to get_group_users in order to manage my own pagination, but that could be an error on my part.

If it's an oversight that get_group_users doesn't page, well, here's a request. If it's deliberate, is there something you can maybe drop in a comment for why this call is seemingly unique/different?

Thanks!

@ccassell
Copy link
Contributor

@gcoxmoz Thanks for the note--it was simply an oversight! We'll see about getting an iterator added for get_group_users as soon as possible.

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

No branches or pull requests

2 participants