-
Notifications
You must be signed in to change notification settings - Fork 839
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
More convenient pagination support in SCIM / Audit Logs API clients #1121
Comments
Hi @ruberVulpes, thanks for writing in! Indeed, that should be more convenient in some situations. One challenge around the feature addition is that, if we enhance the response class as with the WebClient, the internals of the response/client classes can be a bit complex. The reason is that we have to properly support both the default and asyncio-based clients. Thus, I am thinking that providing a kind of wrapper class (in other words, decorator in GoF design pattern) may be easier and cleaner. Here is pseudo code illustrating how it can work: client = SCIMClient(token=os.environ["SLACK_ORG_ADMIN_USER_TOKEN"])
paginator = SCIMClientPaginator(client)
for page in paginator.search_users(filter="""filter=userName Eq "Carly""""):
print(page.users) # list Also, if we add this feature to the SCIM clients, we can do the same for the Audit Logs clients too. |
If it's possible I'd love for the SCIMClient's searches to be able to be paginated like the WebClient does with the SlackResponse. It looks like it could be done with the body returned.
Category (place an
x
in each of the[ ]
)Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: