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

Adding new admin and remote files API methods. #501

Merged
merged 2 commits into from Aug 29, 2019

Conversation

RodneyU215
Copy link
Contributor

Summary

Adds methods and types related to Slack's new Remote Files API. Learn more: https://api.slack.com/messaging/files/remote

Admins of enterprise grid organizations can also now use the Web API to approve, restrict, or list app installation requests. Learn more: https://api.slack.com/admins/managing

Requirements (place an x in each [ ])

@codecov
Copy link

codecov bot commented Aug 27, 2019

Codecov Report

Merging #501 into master will decrease coverage by 0.72%.
The diff coverage is 31.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
- Coverage   69.58%   68.86%   -0.73%     
==========================================
  Files          15       15              
  Lines        1654     1686      +32     
  Branches       91       93       +2     
==========================================
+ Hits         1151     1161      +10     
- Misses        481      503      +22     
  Partials       22       22
Impacted Files Coverage Δ
slack/web/client.py 33.69% <31.25%> (-0.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update add2757...787f4e4. Read the comment docs.

@@ -66,6 +66,33 @@ class WebClient(BaseClient):
removed at anytime.
"""

def admin_apps_approve(self, **kwargs) -> Union[Future, SlackResponse]:
"""Approve an app for installation on a workspace."""
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure how you'd like to handle this (if its a pattern that's happened on other methods), but this method requires either the app_id argument or the request_id argument. technically, they are both optional, but as you can see that's not the whole story.

for comparison, in node we don't have anything helpful to tell the developer about this right now (aside from a code comment). just wanted to flag that in case you could come up with something better for python developers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a great callout! Currently for other methods we manually add this validation. I'll be sure to update this for this method as well. Thank you!

@RodneyU215 RodneyU215 merged commit b88b8cf into master Aug 29, 2019
@RodneyU215 RodneyU215 deleted the RU_new_files_and_admin_apis branch August 29, 2019 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants