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
Added in functionality for admin.analytics.getFile method #1515
Conversation
…o decode response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey nicely done! Left a few comments and questions, this is looking great though!
…re explicit, updated unzip logic and buildResult to be async, added in interface types for responses, updated code_generator script to skip auto generation of AdminAnalyticsGetFile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, looks great to me! Well done
@@ -10,6 +10,7 @@ | |||
|
|||
import { WebAPICallResult } from '../WebClient'; | |||
export type AdminAnalyticsGetFileResponse = WebAPICallResult & { | |||
file_data?: Array<MemberDetails|PublicChannelDetails|PublicChannelMetadataDetails>[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. Great progress
…ated code generation script to account for admin analytics, fixed some spacing, added in a TODO for future improvement for error handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Two last things..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Once the CI builds pass, you can merge this PR (please don't forget squashing the commits into one when clicking the merge button)
Okay, this PR is ready to merge. Thanks for adding this feature! |
Summary
Adding in
admin.analytics.getFile
support as mentioned in: #1191Link to docs for the method is here: https://api.slack.com/methods/admin.analytics.getFile. This method is a little more unique to other methods -
ok
property to note its success. Due to the successful response being binary, it needs to be sent as an ArrayBuffer response to be able to be parsed properly - this was also added in this PR{ ok: false, error: "error message" }
Tested this functionality + tests locally on my own enterprise grid account.
Requirements (place an
x
in each[ ]
)