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

feat: add team.externalTeams.list #1512

Merged
merged 10 commits into from
Jun 20, 2024

Conversation

WilliamBergamin
Copy link
Contributor

Summary

This PR implements the team.externalTeams.list method for the python clients

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.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs-src (Documents, have you run ./scripts/docs.sh?)
  • /docs-src-v2 (Documents, have you run ./scripts/docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@WilliamBergamin WilliamBergamin added enhancement M-T: A feature request for new functionality web-client Version: 3x labels Jun 17, 2024
@WilliamBergamin WilliamBergamin added this to the 3.30.0 milestone Jun 17, 2024
@WilliamBergamin WilliamBergamin self-assigned this Jun 17, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 45.45455% with 18 lines in your changes missing coverage. Please review.

Project coverage is 84.88%. Comparing base (75997b2) to head (c08f10d).

Files Patch % Lines
slack_sdk/web/async_client.py 45.45% 6 Missing ⚠️
slack_sdk/web/client.py 45.45% 6 Missing ⚠️
slack_sdk/web/legacy_client.py 45.45% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1512      +/-   ##
==========================================
- Coverage   85.04%   84.88%   -0.16%     
==========================================
  Files         112      112              
  Lines       12440    12473      +33     
==========================================
+ Hits        10579    10588       +9     
- Misses       1861     1885      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@filmaj filmaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but let's hold off on merging until the API goes public.

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on it! It seems the endpoint is not yet public. Let's hold off merging this PR until the API becomes publicly available.

slack_sdk/web/client.py Outdated Show resolved Hide resolved
slack_sdk/web/client.py Outdated Show resolved Hide resolved
slack_sdk/web/client.py Outdated Show resolved Hide resolved
@@ -17,7 +17,7 @@
class TestWebClientCoverage(unittest.TestCase):
# 284 endpoints as of June 12, 2024
# Can be fetched by running `var methodNames = [].slice.call(document.getElementsByClassName('apiReferenceFilterableList__listItemLink')).map(e => e.href.replace("https://api.slack.com/methods/", ""));console.log(methodNames.toString());console.log(methodNames.length);` on https://api.slack.com/methods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of methods is the output by this JS script. "team.externalTeams.list" is not yet public, so let's hold off making the manual change here until it becomes public.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

WilliamBergamin and others added 4 commits June 18, 2024 09:22
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
@filmaj
Copy link
Contributor

filmaj commented Jun 18, 2024

@WilliamBergamin this API is now live, so when ready, we should merge and release.

slack_sdk/web/async_client.py Outdated Show resolved Hide resolved
slack_sdk/web/client.py Outdated Show resolved Hide resolved
tests/slack_sdk_async/web/test_web_client_coverage.py Outdated Show resolved Hide resolved
@seratch
Copy link
Member

seratch commented Jun 18, 2024

If you have the bandwidth, adding an integration tests for this API call is a great addition for safety and future maintenance (but it's optional)

@WilliamBergamin WilliamBergamin merged commit b464941 into slackapi:main Jun 20, 2024
11 of 12 checks passed
@WilliamBergamin WilliamBergamin deleted the slack-connect-apis branch June 20, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality Version: 3x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants