Skip to content

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

@seratch

Description

@seratch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions