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

WebClient's paginated response iterator does not work for admin.conversations.search API #1049

Closed
1 of 11 tasks
seratch opened this issue Jun 25, 2021 · 0 comments · Fixed by #1061
Closed
1 of 11 tasks
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented good first issue semver:minor Version: 3x web-client
Milestone

Comments

@seratch
Copy link
Member

seratch commented Jun 25, 2021

Usually, next_cursor in an API response exists under response_metadata property. However, only admin.conversations.search API method's response has it at the top level: https://github.com/slackapi/java-slack-sdk/blob/main/slack-api-client/src/main/java/com/slack/api/methods/response/admin/conversations/AdminConversationsSearchResponse.java#L19

Due to this inconsistency, this part in this Python SDK does not work for the API. https://github.com/slackapi/python-slack-sdk/blob/v3.7.0/slack_sdk/web/slack_response.py#L141-L145 We can improve the internals of the class to support the API too.

  • TODOs
    • Add unit tests to reproduce the pattern
    • Change the logic

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)

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.

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:minor web-client Version: 3x good first issue labels Jun 25, 2021
@seratch seratch added this to the 3.8.0 milestone Jun 25, 2021
@seratch seratch changed the title WebClient' WebClient's paginated response iterator does not work for admin.conversations.search API Jun 25, 2021
seratch added a commit to seratch/python-slack-sdk that referenced this issue Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented good first issue semver:minor Version: 3x web-client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant